From: Pierre-Luc Beaudoin Date: Mon, 23 Mar 2009 21:25:00 +0000 (+0200) Subject: Fix actor's reference counting in ChamplainTile X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d442a20a90e3f5482fd6135bb84911f7db9bd325;p=libchamplain Fix actor's reference counting in ChamplainTile --- 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); }