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>
This commit is contained in:
parent
0e9b51ebac
commit
328199d52d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user