diff options
author | Volker Krause <volker.krause@kdab.com> | 2015-07-17 15:35:07 +0200 |
---|---|---|
committer | André Klitzing <aklitzing@gmail.com> | 2015-07-21 21:59:46 +0000 |
commit | 328199d52daa446d18dad3ea0da98d65b5cc5a3f (patch) | |
tree | b82b360d8dc1582f724189d155f1846f6b84c96a /src/widgets | |
parent | 0e9b51ebac1c9ba70d703c5729def6e2aab764f9 (diff) |
Protect against a null widget pointer.
This fixes a crash when using the style for painting without a
corresponding widget.
Change-Id: I0742e4559ed7a78270dab3a1b0162c9617343053
Reviewed-by: André Klitzing <aklitzing@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/styles/qstylesheetstyle.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index ae7accf7d0..ce10b92d85 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -4142,7 +4142,7 @@ void QStyleSheetStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *op switch (pe) { case PE_FrameStatusBar: { - QRenderRule subRule = renderRule(w->parentWidget(), opt, PseudoElement_Item); + QRenderRule subRule = renderRule(w ? w->parentWidget() : Q_NULLPTR, opt, PseudoElement_Item); if (subRule.hasDrawable()) { subRule.drawRule(p, opt->rect); return; |