From: Jim Evins Date: Thu, 7 Jan 2010 04:13:49 +0000 (-0500) Subject: Delay freeing of pixbuf cache in gl_label_finalize() X-Git-Tag: glabels-2_3_0~100 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=091eea6d387183ae34da9a59dbe6ce784e15e544;p=glabels Delay freeing of pixbuf cache in gl_label_finalize() Make sure all objects have been unreferenced before freeing pixbuf cache -- including copies in undo/redo stacks. --- diff --git a/src/label.c b/src/label.c index c09021d8..84fc098e 100644 --- a/src/label.c +++ b/src/label.c @@ -319,7 +319,6 @@ gl_label_finalize (GObject *object) { g_object_unref (G_OBJECT(label->priv->merge)); } - gl_pixbuf_cache_free (label->priv->pixbuf_cache); g_free (label->priv->default_font_family); stack_clear (label->priv->undo_stack); @@ -328,6 +327,8 @@ gl_label_finalize (GObject *object) g_queue_free (label->priv->undo_stack); g_queue_free (label->priv->redo_stack); + gl_pixbuf_cache_free (label->priv->pixbuf_cache); + g_free (label->priv); G_OBJECT_CLASS (gl_label_parent_class)->finalize (object);