From: Christian Dywan Date: Wed, 1 Apr 2009 21:53:45 +0000 (+0200) Subject: Check if we really have a view, it might be invisible X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86292d26f91647acf11562583afb26ded57d3716;p=midori Check if we really have a view, it might be invisible --- diff --git a/midori/midori-browser.c b/midori/midori-browser.c index a4d29655..56fd4250 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -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);