mirror of https://github.com/apache/cloudstack.git
fixed NPE
This commit is contained in:
parent
9d5b7b73a2
commit
c78f14cbc2
|
|
@ -2101,7 +2101,7 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager,
|
|||
_haMgr.cancelScheduledMigrations(host);
|
||||
List<VMInstanceVO> vms = _haMgr.findTakenMigrationWork();
|
||||
for (VMInstanceVO vm : vms) {
|
||||
if (vm.getHostId() != null && vm.getHostId() == hostId) {
|
||||
if (vm != null && vm.getHostId() != null && vm.getHostId() == hostId) {
|
||||
s_logger.info("Unable to cancel migration because the vm is being migrated: " + vm);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue