]> spindle.queued.net Git - midori/commitdiff
Make sure to only update the proxy array if it's still there
authorChristian Dywan <christian@twotoasts.de>
Sat, 18 Jul 2009 13:30:03 +0000 (15:30 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sat, 18 Jul 2009 13:30:03 +0000 (15:30 +0200)
The proxy array of the browser is unset during disposal, so we
may end up trying to work with a NULL value.

midori/midori-browser.c

index 61ababa5a13ec891fc2826279d6f018c7c4c58b6..c50606e5e0e7664efbadd7526ce4fb700c193242 100644 (file)
@@ -4009,8 +4009,9 @@ gtk_notebook_switch_page_cb (GtkWidget*       notebook,
     gtk_window_set_title (GTK_WINDOW (browser), window_title);
     g_free (window_title);
 
-    katze_item_set_meta_integer (KATZE_ITEM (browser->proxy_array), "current",
-                                 midori_browser_get_current_page (browser));
+    if (browser->proxy_array)
+        katze_item_set_meta_integer (KATZE_ITEM (browser->proxy_array), "current",
+                                     midori_browser_get_current_page (browser));
     g_object_notify (G_OBJECT (browser), "uri");
 
     _midori_browser_set_statusbar_text (browser, NULL);