mirror of https://github.com/apache/cloudstack.git
fix CLOUDSTACK-2061 Hitting java NPE in addNicToVirtualMachine api when trying to add a shared network to a VM
This commit is contained in:
parent
985b2aa88d
commit
dfbe11355c
|
|
@ -876,8 +876,8 @@ public class VirtualRouterElement extends AdapterBase implements VirtualRouterEl
|
|||
if (publicNetwork) {
|
||||
routers = _routerDao.listByNetworkAndRole(network.getId(), Role.VIRTUAL_ROUTER);
|
||||
} else {
|
||||
Long podId = dest.getPod().getId();
|
||||
if (isPodBased) {
|
||||
Long podId = dest.getPod().getId();
|
||||
routers = _routerDao.listByNetworkAndPodAndRole(network.getId(), podId, Role.VIRTUAL_ROUTER);
|
||||
} else {
|
||||
routers = _routerDao.listByNetworkAndRole(network.getId(), Role.VIRTUAL_ROUTER);
|
||||
|
|
|
|||
Loading…
Reference in New Issue