From 29dac8ad61fbb14885f9ebc07461227e470a3a0a Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Tue, 15 Sep 2009 08:53:22 +1000 Subject: Don't crash when no focus Hard to reproduce, but all other similar code checks in this way. Reviewed-by: Simon Hausmann --- src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp index f2fe108..41e73fc 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp @@ -1022,7 +1022,8 @@ qreal QWebFrame::zoomFactor() const */ bool QWebFrame::hasFocus() const { - return QWebFramePrivate::kit(d->frame->page()->focusController()->focusedFrame()) == this; + WebCore::Frame* ff = d->frame->page()->focusController()->focusedFrame(); + return QWebFramePrivate::kit(ff) == this; } /*! -- cgit v0.12