Skip to content

Commit df92a45

Browse files
Anthony Xurohityadavcloud
authored andcommitted
fixed NPE
This closes #70 (cherry picked from commit 98b416b) Signed-off-by: Rohit Yadav <[email protected]>
1 parent 422235c commit df92a45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/com/cloud/resource/ResourceManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2080,7 +2080,7 @@ private boolean doCancelMaintenance(long hostId) {
20802080
_haMgr.cancelScheduledMigrations(host);
20812081
List<VMInstanceVO> vms = _haMgr.findTakenMigrationWork();
20822082
for (VMInstanceVO vm : vms) {
2083-
if (vm.getHostId() != null && vm.getHostId() == hostId) {
2083+
if (vm != null && vm.getHostId() != null && vm.getHostId() == hostId) {
20842084
s_logger.info("Unable to cancel migration because the vm is being migrated: " + vm);
20852085
return false;
20862086
}

0 commit comments

Comments
 (0)