ofri masad has uploaded a new change for review. Change subject: dmin: Fix NPE in create new VM from template (server) ......................................................................
dmin: Fix NPE in create new VM from template (server) When creating new server from template the UI stuck because of NPE. added 'if' statement to avoid NPE before 'for' statement Change-Id: Iad209fe2dea747ec7a9018909dc69fe1b3930e14 Bug-Url: https://bugzilla.redhat.com/960957 Signed-off-by: Ofri Masad <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/96/14596/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java index 81590c3..ea3e4a4 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java @@ -846,9 +846,11 @@ } public static StorageDomain getStorageById(Guid storageId, ArrayList<StorageDomain> storageDomains) { - for (StorageDomain storage : storageDomains) { - if (storage.getId().equals(storageId)) { - return storage; + if (storageDomains != null) { + for (StorageDomain storage : storageDomains) { + if (storage.getId().equals(storageId)) { + return storage; + } } } return null; -- To view, visit http://gerrit.ovirt.org/14596 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iad209fe2dea747ec7a9018909dc69fe1b3930e14 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: ofri masad <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
