Make sure that all timeouts in HildonBanner are removed master
authorAlberto Garcia <agarcia@igalia.com>
Thu, 1 Oct 2009 12:11:25 +0000 (14:11 +0200)
committerAlberto Garcia <agarcia@igalia.com>
Thu, 1 Oct 2009 12:11:33 +0000 (14:11 +0200)
* 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
hildon/hildon-banner.c

index e2f135d..43e76df 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-10-01  Alberto Garcia  <agarcia@igalia.com>
+
+       * 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  <agarcia@igalia.com>
 
        * hildon/hildon-banner.c (screen_size_changed):
index cbfb263..54fab3c 100644 (file)
@@ -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);
     }