]> spindle.queued.net Git - midori/commitdiff
Check if we really have a view, it might be invisible
authorChristian Dywan <christian@twotoasts.de>
Wed, 1 Apr 2009 21:53:45 +0000 (23:53 +0200)
committerChristian Dywan <christian@twotoasts.de>
Wed, 1 Apr 2009 21:53:45 +0000 (23:53 +0200)
midori/midori-browser.c

index a4d29655345c7147654682d757d1ae0bf3fb1fb3..56fd4250d0d6a189823f7a4066e9a5a1c85a69cf 100644 (file)
@@ -3128,7 +3128,9 @@ gtk_notebook_switch_page_cb (GtkWidget*       notebook,
     const gchar* title;
     gchar* window_title;
 
-    view = midori_browser_get_current_tab (browser);
+    if (!(view = midori_browser_get_current_tab (browser)))
+        return;
+
     uri = midori_view_get_display_uri (MIDORI_VIEW (view));
     action = _action_by_name (browser, "Location");
     midori_location_action_set_uri (MIDORI_LOCATION_ACTION (action), uri);