mirror of
https://github.com/apache/cloudstack
synced 2026-08-16 01:22:20 +00:00
PublicNetworkGuru: fixed NPE in ipUnassign
This commit is contained in:
parent
27f2b6cbb1
commit
d5bded3d6d
@ -154,7 +154,9 @@ public class PublicNetworkGuru extends AdapterBase implements NetworkGuru {
|
||||
@Override
|
||||
public void deallocate(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm) {
|
||||
IPAddressVO ip = _ipAddressDao.findByAccountAndIp(vm.getVirtualMachine().getAccountId(), nic.getIp4Address());
|
||||
_ipAddressDao.unassignIpAddress(ip.getId());
|
||||
if (ip != null) {
|
||||
_ipAddressDao.unassignIpAddress(ip.getId());
|
||||
}
|
||||
nic.deallocate();
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user