Remove the managed miniobject instances from the hashtable before unreffing
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 21 May 2009 18:56:57 +0000 (20:56 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 21 May 2009 18:56:57 +0000 (20:56 +0200)
gstreamer-sharp/MiniObject.cs

index 2c97f6e..467231f 100644 (file)
@@ -94,13 +94,14 @@ namespace Gst {
         if (o.handle == IntPtr.Zero)
           continue;
 
+        Objects.Remove (o.handle);
+
         try {
           gst_mini_object_unref (o.handle);
         } catch (Exception e) {
           Console.WriteLine ("Exception while disposing a " + o + " in Gtk#");
           throw e;
         }
-        Objects.Remove (o.handle);
         o.handle = IntPtr.Zero;
       }
       return false;