From: Christian Dywan Date: Sun, 19 Jul 2009 16:45:00 +0000 (+0200) Subject: Fall back to the first if the last active tab is not there anymore X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6bd19cd4d9c0d8a5a9808d4554b2402782a8f2e7;p=midori Fall back to the first if the last active tab is not there anymore --- diff --git a/midori/main.c b/midori/main.c index 22312205..78cf5d05 100644 --- a/midori/main.c +++ b/midori/main.c @@ -1310,7 +1310,8 @@ midori_load_session (gpointer data) if (current < 0) current = 0; midori_browser_set_current_page (browser, current); - item = katze_array_get_nth_item (_session, current); + if (!(item = katze_array_get_nth_item (_session, current))) + item = katze_array_get_nth_item (_session, 0); if (!strcmp (katze_item_get_uri (item), "")) midori_browser_activate_action (browser, "Location"); g_object_unref (_session);