Ramesh N has uploaded a new change for review.

Change subject: gluster: fix for NPE in GlusterStorageDeviceListModel
......................................................................

gluster: fix for NPE in GlusterStorageDeviceListModel

  Fix the NPE in HostGlusterStorageDevicesListModel.
updateActionAvailability(). setEntity() will called with
null when moving form hosts tab to other main tabs with
Storage Devices tab being acitve. Handling this case with
the patch

Change-Id: Ie046c2213d4f551d2e818fc1f5b1e2d3b313a022
Signed-off-by: Ramesh Nachimuthu <rnach...@redhat.com>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/HostGlusterStorageDevicesListModel.java
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/03/38703/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/HostGlusterStorageDevicesListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/HostGlusterStorageDevicesListModel.java
index a5027dc..2fdb34b 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/HostGlusterStorageDevicesListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/HostGlusterStorageDevicesListModel.java
@@ -105,7 +105,9 @@
 
     private void updateActionAvailability() {
         VDS vds = getEntity();
-        getSyncStorageDevicesCommand().setIsExecutionAllowed(vds.getStatus() 
== VDSStatus.Up);
+        if (vds != null) {
+            
getSyncStorageDevicesCommand().setIsExecutionAllowed(vds.getStatus() == 
VDSStatus.Up);
+        }
     }
     @Override
     public void executeCommand(UICommand command) {


-- 
To view, visit https://gerrit.ovirt.org/38703
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie046c2213d4f551d2e818fc1f5b1e2d3b313a022
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ramesh N <rnach...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to