summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebKit
diff options
context:
space:
mode:
authorJedrzej Nowacki <jedrzej.nowacki@nokia.com>2009-09-28 15:27:19 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-09-28 15:28:04 (GMT)
commite433f472a765d738238a6b380060ce15c4910148 (patch)
tree91da2dd11225c4c5f04f0a9bfc1b19bdf40ef8a6 /src/3rdparty/webkit/WebKit
parent14a896cf6b8b67a8d83a6204737249afa9ecd220 (diff)
downloadQt-e433f472a765d738238a6b380060ce15c4910148.zip
Qt-e433f472a765d738238a6b380060ce15c4910148.tar.gz
Qt-e433f472a765d738238a6b380060ce15c4910148.tar.bz2
Fix QWebHistory autotest crashes
https://bugs.webkit.org/show_bug.cgi?id=29803 Reviewed-by: Simon Hausmann Cherry-picked-by: Simon Hausmann
Diffstat (limited to 'src/3rdparty/webkit/WebKit')
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp10
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;
}