This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch 4.11
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.11 by this push:
     new 8c387f9  vmware: fix potential NPE when memory hotplug capability is 
checked (#3362)
8c387f9 is described below

commit 8c387f9de6d76cfa983b6fa7f39b2e9df4be4266
Author: Rohit Yadav <[email protected]>
AuthorDate: Fri May 31 10:27:36 2019 +0530

    vmware: fix potential NPE when memory hotplug capability is checked (#3362)
    
    This fixes potential NPE case when memory hotpluggability is checked
    based on the guest OS descriptor.
    
    Signed-off-by: Rohit Yadav <[email protected]>
---
 vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java 
b/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
index b700b6d..1ab325b 100644
--- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
@@ -3281,7 +3281,7 @@ public class VirtualMachineMO extends BaseMO {
         virtualHardwareVersion = getVirtualHardwareVersion();
 
         // Check if guest operating system supports memory hotadd
-        if (guestOsDescriptor.isSupportsMemoryHotAdd()) {
+        if (guestOsDescriptor != null && 
guestOsDescriptor.isSupportsMemoryHotAdd()) {
             guestOsSupportsMemoryHotAdd = true;
         }
         // Check if virtual machine is using hardware version 7 or later.

Reply via email to