]> spindle.queued.net Git - midori/commitdiff
Remove any left timeouts if the browser is destroyed
authorMatthias Kruk <mkruk@matthiaskruk.de>
Tue, 24 Feb 2009 21:59:18 +0000 (22:59 +0100)
committerChristian Dywan <christian@twotoasts.de>
Tue, 24 Feb 2009 21:59:18 +0000 (22:59 +0100)
midori/midori-browser.c

index 345801361a49219ac5de753790fc8daf7aab037d..2f68ef07bd83a8ffd2c17c0152135539d9508d80 100644 (file)
@@ -3111,6 +3111,11 @@ midori_browser_size_allocate_cb (MidoriBrowser* browser,
 static void
 midori_browser_destroy_cb (MidoriBrowser* browser)
 {
+    if (G_UNLIKELY (browser->panel_timeout))
+        g_source_remove (browser->panel_timeout);
+    if (G_UNLIKELY (browser->alloc_timeout))
+        g_source_remove (browser->alloc_timeout);
+
     /* Destroy panel first, so panels don't need special care */
     gtk_widget_destroy (browser->panel);
     /* Destroy tabs second, so child widgets don't need special care */