Alona Kaplan has uploaded a new change for review.

Change subject: webadmin: Cannot add network to VM when dc have bridgeless 
mgmnt network
......................................................................

webadmin: Cannot add network to VM when dc have bridgeless mgmnt network

If the management network is brigeless it is not in the vm network list.
If there are no other networks in the list it gets to the last "null"
network and caused NPE.

Change-Id: I9f844fde815c00dff441192d9e977e4c23615ce3
Bug-Url: https://bugzilla.redhat.com/911115
Signed-off-by: Alona Kaplan <alkap...@redhat.com>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewVmInterfaceModel.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/39/12139/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewVmInterfaceModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewVmInterfaceModel.java
index 3386086..3a624cb 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewVmInterfaceModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewVmInterfaceModel.java
@@ -77,7 +77,7 @@
         List<Network> networks = (List<Network>) getNetwork().getItems();
         networks = networks == null ? new ArrayList<Network>() : networks;
         for (Network network : networks) {
-            if (ENGINE_NETWORK_NAME != null && 
ENGINE_NETWORK_NAME.equals(network.getName())) {
+            if (ENGINE_NETWORK_NAME != null && network != null && 
ENGINE_NETWORK_NAME.equals(network.getName())) {
                 getNetwork().setSelectedItem(network);
                 return;
             }


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f844fde815c00dff441192d9e977e4c23615ce3
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <alkap...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to