summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@theqtcompany.com>2016-01-15 15:17:54 +0100
committerMorten Johan Sørvig <morten.sorvig@theqtcompany.com>2016-01-18 12:33:49 +0000
commitf634ce3b9a38b163a6ef4d57d6bd61745d5248c9 (patch)
tree57f5b8e538e1108d7a417b444b3f09d5196d2326
parent50073521649e3818d87920751ab95acd2c2dfd15 (diff)
QFocusFrame: Don't crash on null d->widget.
This can happen with a suitably complex use case (See QTBUG-50263) Change-Id: Ie8fa7b5872a902e802fda5795ade3369399ddb54 Task-number: QTBUG-50263 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
-rw-r--r--src/widgets/widgets/qfocusframe.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/widgets/widgets/qfocusframe.cpp b/src/widgets/widgets/qfocusframe.cpp
index 5a403fa669..bf8cb30ef7 100644
--- a/src/widgets/widgets/qfocusframe.cpp
+++ b/src/widgets/widgets/qfocusframe.cpp
@@ -250,6 +250,10 @@ void
QFocusFrame::paintEvent(QPaintEvent *)
{
Q_D(QFocusFrame);
+
+ if (!d->widget)
+ return;
+
QStylePainter p(this);
QStyleOption option;
initStyleOption(&option);