mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-11 05:17:59 +03:00
create: Fix error when detecting OS in 'show all' list
The will be free'd when the widget is repopulated, so don't access stale data.
This commit is contained in:
parent
3ae2b0959d
commit
3d49bbe649
@ -1206,6 +1206,7 @@ class vmmCreate(vmmGObjectUI):
|
||||
type_row = self._selected_os_row()
|
||||
if not type_row:
|
||||
return
|
||||
old_type = type_row[0]
|
||||
|
||||
self.show_all_os = True
|
||||
self.populate_os_type_model()
|
||||
@ -1213,7 +1214,7 @@ class vmmCreate(vmmGObjectUI):
|
||||
os_type_list = self.widget("install-os-type")
|
||||
os_type_model = os_type_list.get_model()
|
||||
for idx in range(len(os_type_model)):
|
||||
if os_type_model[idx][0] == type_row[0]:
|
||||
if os_type_model[idx][0] == old_type:
|
||||
os_type_list.set_active(idx)
|
||||
break
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user