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 <[email protected]>
---
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/39/40039/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 cb21102..564e28c 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/40039
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie046c2213d4f551d2e818fc1f5b1e2d3b313a022
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5-gluster
Gerrit-Owner: Ramesh N <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to