Added missing null pointer check in QMacStyle
QMacStyle::subElementRect could crash if SE_LineEditContents was used without providing a widget pointer. Task-number: QTBUG-27033 Change-Id: I15ef07ae1310be4257a8480d392f98dbf02168d3 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>bb10
parent
0b8065b581
commit
7cc3a3adf2
|
|
@ -4565,7 +4565,7 @@ QRect QMacStyle::subElementRect(SubElement sr, const QStyleOption *opt,
|
|||
break;
|
||||
case SE_LineEditContents:
|
||||
rect = QCommonStyle::subElementRect(sr, opt, widget);
|
||||
if(widget->parentWidget() && qobject_cast<const QComboBox*>(widget->parentWidget()))
|
||||
if (widget && qobject_cast<const QComboBox*>(widget->parentWidget()))
|
||||
rect.adjust(-1, -2, 0, 0);
|
||||
else
|
||||
rect.adjust(-1, -1, 0, +1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue