diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp index a6942a4..af27788 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp @@ -1491,9 +1491,11 @@ QWebPage::QWebPage(QObject *parent) */ QWebPage::~QWebPage() { - FrameLoader *loader = d->mainFrame->d->frame->loader(); - if (loader) - loader->detachFromParent(); + if (d->mainFrame) { + FrameLoader *loader = d->mainFrame->d->frame->loader(); + if (loader) + loader->detachFromParent(); + } if (d->inspector) d->inspector->setPage(0); delete d; @@ -1520,6 +1522,7 @@ QWebFrame *QWebPage::mainFrame() const */ QWebFrame *QWebPage::currentFrame() const { + d->createMainFrame(); return static_cast<WebCore::FrameLoaderClientQt *>(d->page->focusController()->focusedOrMainFrame()->loader()->client())->webFrame(); } @@ -1545,6 +1548,7 @@ QWebFrame* QWebPage::frameAt(const QPoint& pos) const */ QWebHistory *QWebPage::history() const { + d->createMainFrame(); return &d->history; } |