CLOUDSTACK-9196: Fixing null pointer exception when vm meta data is synced on

upgraded setup.
This commit is contained in:
Anshul Gangwar 2015-06-18 15:49:29 +05:30
parent 7e12ebf280
commit cbbec6f8e2
1 changed files with 1 additions and 1 deletions

View File

@ -2641,7 +2641,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
if(!found) {
VMInstanceVO vm = _vmDao.findVMByInstanceName(name);
if(vm.getType() == VirtualMachine.Type.User) {
if(vm != null && vm.getType() == VirtualMachine.Type.User) {
updateVmMetaData(vm.getId(), platform);
}
}