From d442a20a90e3f5482fd6135bb84911f7db9bd325 Mon Sep 17 00:00:00 2001 From: Pierre-Luc Beaudoin Date: Mon, 23 Mar 2009 23:25:00 +0200 Subject: [PATCH] Fix actor's reference counting in ChamplainTile --- champlain/champlain-tile.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/champlain/champlain-tile.c b/champlain/champlain-tile.c index 4bc6b5c..99fe5fd 100644 --- a/champlain/champlain-tile.c +++ b/champlain/champlain-tile.c @@ -142,8 +142,13 @@ champlain_tile_dispose (GObject *object) { ChamplainTilePrivate *priv = GET_PRIVATE (object); + g_free (priv->uri); + g_free (priv->filename); if (priv->actor != NULL) - priv->actor = NULL; + { + g_object_unref (G_OBJECT (priv->actor)); + priv->actor = NULL; + } G_OBJECT_CLASS (champlain_tile_parent_class)->dispose (object); } @@ -151,13 +156,6 @@ champlain_tile_dispose (GObject *object) static void champlain_tile_finalize (GObject *object) { - ChamplainTilePrivate *priv = GET_PRIVATE (object); - - g_free (priv->uri); - g_free (priv->filename); - if (priv->actor != NULL) - g_object_unref (G_OBJECT (priv->actor)); - G_OBJECT_CLASS (champlain_tile_parent_class)->finalize (object); } -- 2.39.5