From 887639e8355ff5e4034dcb7a133f320284448c8f Mon Sep 17 00:00:00 2001 From: Pierre-Luc Beaudoin Date: Mon, 18 May 2009 14:17:37 -0400 Subject: [PATCH] Add assertion on tile's content --- champlain/champlain-tile.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/champlain/champlain-tile.c b/champlain/champlain-tile.c index 5bab7c5..b666b7e 100644 --- a/champlain/champlain-tile.c +++ b/champlain/champlain-tile.c @@ -838,8 +838,8 @@ fade_in_completed (ClutterAnimation *animation, if (ctx->old_actor != NULL) { - g_object_unref (ctx->old_actor); clutter_container_remove (CLUTTER_CONTAINER (priv->actor), ctx->old_actor, NULL); + g_object_unref (ctx->old_actor); } g_object_unref (ctx->tile); @@ -870,6 +870,10 @@ champlain_tile_set_content (ChamplainTile *self, if (priv->content_actor != NULL) { + /* it sometimes happen that the priv->content_actor has been destroyed, + * this assert will help determine when with no impact on the user */ + g_assert (CLUTTER_IS_ACTOR (priv->content_actor)); + if (fade_in == TRUE) old_actor = g_object_ref (priv->content_actor); else @@ -879,7 +883,6 @@ champlain_tile_set_content (ChamplainTile *self, clutter_container_add (CLUTTER_CONTAINER (priv->actor), actor, NULL); - /* fixme: etemplate are leaked here */ if (fade_in == TRUE) { ClutterAnimation *animation; -- 2.39.5