Gustavo Frederico Temple Pedrosa has uploaded a new change for review.

Change subject: core: [Fix] NPE in UpdateVmTemplateCommand
......................................................................

core: [Fix] NPE in UpdateVmTemplateCommand

Fix NPE in the UpdateVmTemplateCommand when checking if the watchdog
model is supported.

Change-Id: I73f74f9899fa39c2b651a6f1b83376ddade6bf11
Signed-off-by: Gustavo Pedrosa <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmTemplateCommand.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/74/22574/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmTemplateCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmTemplateCommand.java
index e811aed..edd4e25 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmTemplateCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmTemplateCommand.java
@@ -98,7 +98,7 @@
         }
 
         // Check if the watchdog model is supported
-        if (returnValue) {
+        if (returnValue && getParameters().getWatchdog() != null) {
             returnValue = validate((new 
VmWatchdogValidator(getParameters().getVmTemplateData().getOsId(),
                     getParameters().getWatchdog(),
                     
getVdsGroup().getcompatibility_version())).isModelCompatibleWithOs());


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

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

Reply via email to