mirror of https://github.com/apache/cloudstack.git
fixed NPE
(cherry picked from commit c78f14cbc2)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
bf17f640c6
commit
98b416b7f0
|
|
@ -2107,7 +2107,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