Fix a possible crash in StyleSheetStyle
Task-number: QTBUG-35901 Change-Id: I72e82a166d30cf5e4dac2917c633c7cbd355c817 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
This commit is contained in:
parent
03b6a2f0f9
commit
e4b94dd19c
@ -4710,7 +4710,9 @@ int QStyleSheetStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PM_TabBarBaseOverlap: {
|
case PM_TabBarBaseOverlap: {
|
||||||
const QWidget *tabWidget = qobject_cast<const QTabWidget *>(w) ? w : w->parentWidget();
|
const QWidget *tabWidget = qobject_cast<const QTabWidget *>(w);
|
||||||
|
if (!tabWidget && w)
|
||||||
|
tabWidget = w->parentWidget();
|
||||||
if (hasStyleRule(tabWidget, PseudoElement_TabWidgetPane)) {
|
if (hasStyleRule(tabWidget, PseudoElement_TabWidgetPane)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user