Skip to content

Commit dfbe113

Browse files
author
Mice Xia
committed
fix CLOUDSTACK-2061 Hitting java NPE in addNicToVirtualMachine api when trying to add a shared network to a VM
1 parent 985b2aa commit dfbe113

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

server/src/com/cloud/network/element/VirtualRouterElement.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,8 +876,8 @@ protected List<DomainRouterVO> getRouters(Network network, DeployDestination des
876876
if (publicNetwork) {
877877
routers = _routerDao.listByNetworkAndRole(network.getId(), Role.VIRTUAL_ROUTER);
878878
} else {
879-
Long podId = dest.getPod().getId();
880879
if (isPodBased) {
880+
Long podId = dest.getPod().getId();
881881
routers = _routerDao.listByNetworkAndPodAndRole(network.getId(), podId, Role.VIRTUAL_ROUTER);
882882
} else {
883883
routers = _routerDao.listByNetworkAndRole(network.getId(), Role.VIRTUAL_ROUTER);

0 commit comments

Comments
 (0)