Check if we really have a view, it might be invisible

This commit is contained in:
Christian Dywan 2009-04-01 23:53:45 +02:00
parent 62eff73c30
commit 86292d26f9

View file

@ -3128,7 +3128,9 @@ gtk_notebook_switch_page_cb (GtkWidget* notebook,
const gchar* title; const gchar* title;
gchar* window_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)); uri = midori_view_get_display_uri (MIDORI_VIEW (view));
action = _action_by_name (browser, "Location"); action = _action_by_name (browser, "Location");
midori_location_action_set_uri (MIDORI_LOCATION_ACTION (action), uri); midori_location_action_set_uri (MIDORI_LOCATION_ACTION (action), uri);