Asaf Shakarchi has uploaded a new change for review.

Change subject: webadmin: A NPE check in ImportVmModel:init method.
......................................................................

webadmin: A NPE check in ImportVmModel:init method.

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

Change-Id: Icdba43d13299d0768c1449c450de61cb6b0a3df9
Signed-off-by: Asaf Shakarchi <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/ImportVmModel.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/23/11723/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/ImportVmModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/ImportVmModel.java
index ca5b86d..ca3fdcd 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/ImportVmModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/ImportVmModel.java
@@ -202,7 +202,7 @@
                 }
                 setStoragePool(dataCenter);
                 // show quota
-                if (dataCenter.getQuotaEnforcementType() != 
QuotaEnforcementTypeEnum.DISABLED) {
+                if (dataCenter != null && dataCenter.getQuotaEnforcementType() 
!= QuotaEnforcementTypeEnum.DISABLED) {
                     hasQuota = true;
                 }
                 if (hasQuota) {


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icdba43d13299d0768c1449c450de61cb6b0a3df9
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