]> spindle.queued.net Git - midori/commitdiff
Fall back to the first if the last active tab is not there anymore
authorChristian Dywan <christian@twotoasts.de>
Sun, 19 Jul 2009 16:45:00 +0000 (18:45 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sun, 19 Jul 2009 16:45:00 +0000 (18:45 +0200)
midori/main.c

index 223122059c6f367b09a8b1bf199f6f24f069c747..78cf5d054f559130bee67b65598e0168e0cc28b1 100644 (file)
@@ -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);