Skip to content

Commit 875cd14

Browse files
server: fix fail to list public ips of shared networks sometimes (#8624)
1 parent d77998c commit 875cd14

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

server/src/main/java/com/cloud/api/ApiResponseHelper.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,6 +992,12 @@ private void addSystemVmInfoToIpResponse(NicVO nic, IPAddressResponse ipResponse
992992
if (!isAdmin) {
993993
return;
994994
}
995+
try {
996+
nic.getInstanceId();
997+
} catch (NullPointerException ex) {
998+
return;
999+
}
1000+
9951001
VirtualMachine vm = ApiDBUtils.findVMInstanceById(nic.getInstanceId());
9961002
if (vm == null) {
9971003
return;

0 commit comments

Comments
 (0)