[gnome-boxes] collection-view: Don't assume item to be Machine



commit 2ef4b81a21e4d7d9186cdb15e06f9e30bbbe35e4
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Wed Jul 8 14:34:20 2015 +0100

    collection-view: Don't assume item to be Machine

 src/collection-view.vala |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/collection-view.vala b/src/collection-view.vala
index 38e236e..72b2466 100644
--- a/src/collection-view.vala
+++ b/src/collection-view.vala
@@ -213,8 +213,6 @@ private class Boxes.CollectionView: Gd.MainView, Boxes.UI {
         store.remove (iter);
         item.set_data<Gtk.TreeIter?> ("iter", null);
 
-        var thumbnail_id = item.get_data<ulong> ("thumbnail_id");
-        (item as Machine).thumbnailer.disconnect (thumbnail_id);
         var name_id = item.get_data<ulong> ("name_id");
         item.disconnect (name_id);
         var info_id = item.get_data<ulong> ("info_id");
@@ -229,6 +227,9 @@ private class Boxes.CollectionView: Gd.MainView, Boxes.UI {
             var machine = item as Machine;
             var categories_id = item.get_data<ulong> ("categories_id");
             machine.config.disconnect (categories_id);
+
+            var thumbnail_id = item.get_data<ulong> ("thumbnail_id");
+            machine.thumbnailer.disconnect (thumbnail_id);
         }
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]