Repository: cloudstack Updated Branches: refs/heads/master de436acac -> b98a989e3
CLOUDSTACK-9196: Fixing null pointer exception when vm meta data is synced on upgraded setup. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cbbec6f8 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cbbec6f8 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cbbec6f8 Branch: refs/heads/master Commit: cbbec6f8e26b8a25a87aa0e841ad86cf6a8fe957 Parents: 7e12ebf Author: Anshul Gangwar <anshul.gang...@citrix.com> Authored: Thu Jun 18 15:49:29 2015 +0530 Committer: Anshul Gangwar <anshul.gang...@citrix.com> Committed: Tue Dec 22 16:39:22 2015 +0530 ---------------------------------------------------------------------- .../orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cbbec6f8/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java ---------------------------------------------------------------------- diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java index 5c58389..300475a 100644 --- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java +++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java @@ -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); } }