From 3d133ba225cb64205fcb6e994cc6e107fb8564bb Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Thu, 1 Oct 2009 14:11:25 +0200 Subject: [PATCH] Make sure that all timeouts in HildonBanner are removed * hildon/hildon-banner.c (hildon_banner_timeout): Remove the timeout, if present, before setting it to 0. Fixes: NB#141447 (HildonBanner crashes if a new one is shown during a delete event) --- ChangeLog | 8 ++++++++ hildon/hildon-banner.c | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e2f135d..43e76df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-10-01 Alberto Garcia + + * hildon/hildon-banner.c (hildon_banner_timeout): + Remove the timeout, if present, before setting it to 0. + + Fixes: NB#141447 (HildonBanner crashes if a new one is shown + during a delete event) + 2009-09-30 Alberto Garcia * hildon/hildon-banner.c (screen_size_changed): diff --git a/hildon/hildon-banner.c b/hildon/hildon-banner.c index cbfb263..54fab3c 100644 --- a/hildon/hildon-banner.c +++ b/hildon/hildon-banner.c @@ -306,7 +306,10 @@ hildon_banner_timeout (gpointer data) if (! continue_timeout) { HildonBannerPrivate *priv = HILDON_BANNER_GET_PRIVATE (data); - priv->timeout_id = 0; + if (priv->timeout_id) { + g_source_remove (priv->timeout_id); + priv->timeout_id = 0; + } gtk_widget_destroy (widget); } -- 1.7.9.5