From 6bd19cd4d9c0d8a5a9808d4554b2402782a8f2e7 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sun, 19 Jul 2009 18:45:00 +0200 Subject: [PATCH] Fall back to the first if the last active tab is not there anymore --- midori/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.39.5