From a22c9cbaf7fb0a995c1d89371d2d679e3fd1b3c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20E=2E=20Narv=C3=A1ez?= Date: Wed, 26 Sep 2012 06:32:50 -0500 Subject: Check if URL is Valid Before Checking if it's about: Protocol Check if the URL of the current tab is even valid before checking its protocol. REVIEW: 106561 --- src/sessionmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sessionmanager.cpp') diff --git a/src/sessionmanager.cpp b/src/sessionmanager.cpp index d5bc1ff8..b825ac28 100644 --- a/src/sessionmanager.cpp +++ b/src/sessionmanager.cpp @@ -208,7 +208,7 @@ void SessionManager::restoreCrashedSession() MainView *mv = (winNo == 0) ? rApp->mainWindow()->mainView() : rApp->newMainWindow()->mainView(); - bool useCurrentTab = (mv->currentWebTab()->url().protocol() == QL1S("about")); + bool useCurrentTab = (!mv->currentWebTab()->url().isValid() || (mv->currentWebTab()->url().protocol() == QL1S("about"))); int currentTab = loadViewTabs(mv, window, useCurrentTab); mv->setCurrentIndex(currentTab); -- cgit v1.2.1