Remove any left timeouts if the browser is destroyed

This commit is contained in:
Matthias Kruk 2009-02-24 22:59:18 +01:00 committed by Christian Dywan
parent 3abace66ea
commit 1f00d2ed14

View file

@ -3111,6 +3111,11 @@ midori_browser_size_allocate_cb (MidoriBrowser* browser,
static void static void
midori_browser_destroy_cb (MidoriBrowser* browser) 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 */ /* Destroy panel first, so panels don't need special care */
gtk_widget_destroy (browser->panel); gtk_widget_destroy (browser->panel);
/* Destroy tabs second, so child widgets don't need special care */ /* Destroy tabs second, so child widgets don't need special care */