summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-03-19 09:44:28 +0100
committerAndrea Diamantini <adjam7@gmail.com>2011-03-19 09:44:28 +0100
commita309167dc747072830ad47b979c926e9083e6f63 (patch)
tree3c209be5e3a843ce6b66330e6fc8433ffc3a112f
parentrekonq 0.6.89 (diff)
downloadrekonq-a309167dc747072830ad47b979c926e9083e6f63.tar.xz
Check if mainWindow and currentab really exist before using in bookmarksprovider.
In fact now this is NOT automagically ensured there (as in any non widget rekonq class) BUG:268838
-rw-r--r--src/bookmarks/bookmarkprovider.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bookmarks/bookmarkprovider.cpp b/src/bookmarks/bookmarkprovider.cpp
index 1bcff5eb..9049c305 100644
--- a/src/bookmarks/bookmarkprovider.cpp
+++ b/src/bookmarks/bookmarkprovider.cpp
@@ -201,7 +201,7 @@ void BookmarkProvider::slotBookmarksChanged()
fillBookmarkBar(bookmarkToolBar);
}
}
- if (rApp->mainWindow()->currentTab()->url().toMimeDataString().contains("about:bookmarks"))
+ if (rApp->mainWindow() && rApp->mainWindow()->currentTab() && rApp->mainWindow()->currentTab()->url().toMimeDataString().contains("about:bookmarks"))
rApp->loadUrl(KUrl("about:bookmarks"), Rekonq::CurrentTab);
}
@@ -250,7 +250,7 @@ void BookmarkProvider::slotPanelChanged()
if (panel && panel != sender())
panel->loadFoldedState();
}
- if (rApp->mainWindow()->currentTab()->url().toMimeDataString().contains("about:bookmarks"))
+ if (rApp->mainWindow() && rApp->mainWindow()->currentTab() && rApp->mainWindow()->currentTab()->url().toMimeDataString().contains("about:bookmarks"))
rApp->loadUrl(KUrl("about:bookmarks"), Rekonq::CurrentTab);
}