fix NPE when delete a domain

This commit is contained in:
Wei Zhou 2014-12-04 15:28:41 +01:00
parent 7b8fe0c8cd
commit d4605556c6
1 changed files with 1 additions and 1 deletions

View File

@ -1374,7 +1374,7 @@ public class RulesManagerImpl extends ManagerBase implements RulesManager, Rules
throw new CloudRuntimeException("Ip address is not associated with any network");
}
VMInstanceVO vm = _vmInstanceDao.findById(sourceIp.getAssociatedWithVmId());
VMInstanceVO vm = _vmInstanceDao.findByIdIncludingRemoved(sourceIp.getAssociatedWithVmId());
Network network = _networkModel.getNetwork(networkId);
if (network == null) {
CloudRuntimeException ex = new CloudRuntimeException("Unable to find an ip address to map to specified vm id");