From: Pierre-Luc Beaudoin Date: Sun, 3 May 2009 19:02:41 +0000 (-0400) Subject: Fix a bug where shadow would show up for image only markers X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=870785f808df32e2842e96e0acb542e6c01162c1;p=libchamplain Fix a bug where shadow would show up for image only markers --- diff --git a/champlain/champlain-marker.c b/champlain/champlain-marker.c index 7e8dc6c..7f0abff 100644 --- a/champlain/champlain-marker.c +++ b/champlain/champlain-marker.c @@ -593,12 +593,22 @@ draw_marker (ChamplainMarker *marker) draw_shadow (marker, total_width, total_height, point); draw_background (marker, total_width, total_height, point); } - else if (priv->background != NULL) - { - clutter_container_remove_actor (CLUTTER_CONTAINER (marker), priv->background); - g_object_unref (G_OBJECT (priv->background)); - priv->background = NULL; - } + else + { + if (priv->background != NULL) + { + clutter_container_remove_actor (CLUTTER_CONTAINER (marker), priv->background); + g_object_unref (G_OBJECT (priv->background)); + priv->background = NULL; + } + + if (priv->shadow != NULL) + { + clutter_container_remove_actor (CLUTTER_CONTAINER (marker), priv->shadow); + g_object_unref (G_OBJECT (priv->shadow)); + priv->shadow = NULL; + } + } if (priv->text_actor != NULL && priv->background != NULL) clutter_actor_raise (priv->text_actor, priv->background);