Asaf Shakarchi has uploaded a new change for review.

Change subject: webadmin: A NPE check in SetupNetworksModel:onEdit
......................................................................

webadmin: A NPE check in SetupNetworksModel:onEdit

There's a possible branch of statement, that if executed
a null value will be dereferenced. this patch verifies that the model
editPopup is not null before dereferenced.

Change-Id: I165a3f298bc306d65cefceef3a8dfd24dc366774
Signed-off-by: Asaf Shakarchi <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/24/11724/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
index 2204cc6..3db1679 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
@@ -400,8 +400,10 @@
         
cancelCommand.setTitle(ConstantsManager.getInstance().getConstants().cancel());
         cancelCommand.setIsCancel(true);
 
-        editPopup.getCommands().add(okCommand);
-        editPopup.getCommands().add(cancelCommand);
+        if (editPopup != null) {
+            editPopup.getCommands().add(okCommand);
+            editPopup.getCommands().add(cancelCommand);
+        }
         sourceListModel.setConfirmWindow(editPopup);
     }
 


--
To view, visit http://gerrit.ovirt.org/11724
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I165a3f298bc306d65cefceef3a8dfd24dc366774
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Asaf Shakarchi <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to