gegl r2944 - in trunk: . gegl/buffer



Author: martinn
Date: Mon Feb 23 20:35:54 2009
New Revision: 2944
URL: http://svn.gnome.org/viewvc/gegl?rev=2944&view=rev

Log:
Avoid using a destroyed GeglNode parent in GeglCache

Check for the GeglNode reference to be valid in GeglCache::dispose()
before using it as in some cases we get to dispose() when the GeglNode
parent is already destroyed and invalid.

Modified:
   trunk/ChangeLog
   trunk/gegl/buffer/gegl-cache.c

Modified: trunk/gegl/buffer/gegl-cache.c
==============================================================================
--- trunk/gegl/buffer/gegl-cache.c	(original)
+++ trunk/gegl/buffer/gegl-cache.c	Mon Feb 23 20:35:54 2009
@@ -202,7 +202,10 @@
 
   while (g_idle_remove_by_data (gobject)) ;
 
-  if (self->node)
+  /* Check with GEGL_IS_NODE since sometimes the node is destroyed
+   * before we get here
+   */
+  if (GEGL_IS_NODE (self->node))
     {
       gint handler = g_signal_handler_find (self->node, G_SIGNAL_MATCH_DATA,
                                             g_signal_lookup ("invalidated",



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