diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2011-03-19 09:44:28 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2011-03-19 09:44:28 +0100 |
commit | a309167dc747072830ad47b979c926e9083e6f63 (patch) | |
tree | 3c209be5e3a843ce6b66330e6fc8433ffc3a112f | |
parent | rekonq 0.6.89 (diff) | |
download | rekonq-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.cpp | 4 |
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); } |