(gtk_sheet_dispose): Set the sheet's entry_container and button
authorBen Pfaff <blp@gnu.org>
Wed, 7 May 2008 00:09:00 +0000 (00:09 +0000)
committerBen Pfaff <blp@gnu.org>
Wed, 7 May 2008 00:09:00 +0000 (00:09 +0000)
members to NULL after unref'ing them, so that a later call to
gtk_sheet_for_all will not try to dereference a dangling pointer.

lib/gtksheet/ChangeLog
lib/gtksheet/gtksheet.c

index 8e92297996b1891671b8bad65be2985d9a0e9af6..910c15d9a314f964deea5eb4ab6118f33ee8f789 100644 (file)
@@ -1,3 +1,10 @@
+2008-05-06  Ben Pfaff  <blp@gnu.org>
+
+       * gtksheet.c (gtk_sheet_dispose): Set the sheet's entry_container
+       and button members to NULL after unref'ing them, so that a later
+       call to gtk_sheet_for_all will not try to dereference a dangling
+       pointer.
+
 2008-03-06 John Darrington <john@darrington.wattle.id.au>
 
        * gsheet-row-iface.c gsheet-row-iface.h: Delete unused, unneccesary
index eba0ea4002474f060bbd49f2c9799c0bb154792c..1f0e83fac72d6651c3e3ef79b19c240c96e00e0a 100644 (file)
@@ -2440,7 +2440,10 @@ gtk_sheet_dispose  (GObject *object)
   if (sheet->column_geometry) g_object_unref (sheet->column_geometry);
 
   g_object_unref (sheet->entry_container);
+  sheet->entry_container = NULL;
+
   g_object_unref (sheet->button);
+  sheet->button = NULL;
 
   /* unref adjustments */
   if (sheet->hadjustment)