netlist: Fix UI error when virtual network doesn't exist

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2024-03-02 11:10:41 -05:00
parent cf172c8e57
commit 7ae3e10bc4

View File

@ -397,9 +397,12 @@ class vmmNetworkList(vmmGObjectUI):
uiutil.set_grid_row_visible(
self.widget("net-manual-source"), show_bridge)
portgroups = []
net = None
if is_virtual:
net = self.conn.get_net_by_name(rowdata.source)
portgroups = []
if net:
portgroups = net.get_xmlobj().portgroups
uiutil.set_grid_row_visible(