File 536152fe-fix-error-detecting-OS-in-show-all-list.patch of Package virt-manager

Subject: create: Fix error when detecting OS in 'show all' list
From: Cole Robinson crobinso@redhat.com Wed Apr 30 15:46:06 2014 -0400
Date: Wed Apr 30 15:46:06 2014 -0400:
Git: 3d49bbe6494ac1fa9305c019df1db81371a89385

The will be free'd when the widget is repopulated, so don't access
stale data.

Index: virt-manager-1.0.1/virtManager/create.py
===================================================================
--- virt-manager-1.0.1.orig/virtManager/create.py
+++ virt-manager-1.0.1/virtManager/create.py
@@ -1181,6 +1181,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()
@@ -1188,7 +1189,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
 
openSUSE Build Service is sponsored by