From b05d2a34798010a82140ce5e045b8ce045875d0e Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 16 Sep 2011 15:45:01 +0200 Subject: Prevent crash on "uncommon" pages BUG: 282092 --- src/newtabpage.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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 (m_root.webFrame()->page()); page->mainFrame()->setHtml(m_html); page->setIsOnRekonqPage(true); -- cgit v1.2.1