summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-09-16 15:45:01 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-09-16 15:45:01 +0200
commitb05d2a34798010a82140ce5e045b8ce045875d0e (patch)
tree2d4184f715aacc1f7de0fd93cff940c036968a04
parentFix urlbar loading on QtWebKit2.2 (diff)
downloadrekonq-b05d2a34798010a82140ce5e045b8ce045875d0e.tar.xz
Prevent crash on "uncommon" pages
BUG: 282092
-rw-r--r--src/newtabpage.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/newtabpage.cpp b/src/newtabpage.cpp
index f1cddc5e..ba0c37ce 100644
--- a/src/newtabpage.cpp
+++ b/src/newtabpage.cpp
@@ -122,6 +122,9 @@ void NewTabPage::generate(const KUrl &url)
return;
}
+ // webFrame can be null. See bug:282092
+ if (!m_root.webFrame())
+ return;
WebPage *page = qobject_cast <WebPage *>(m_root.webFrame()->page());
page->mainFrame()->setHtml(m_html);
page->setIsOnRekonqPage(true);