Core: fix possible nullptr deref.

Change-Id: Iaa9182579afa19c9c8f184f964eeace3bc7b7906
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Erik Verbruggen
2014-09-11 10:48:59 +02:00
parent 975186c7fc
commit 9e4d1709b5

View File

@@ -906,7 +906,7 @@ void ManhattanStyle::drawComplexControl(ComplexControl control, const QStyleOpti
tool.rect = tool.rect.adjusted(2, 2, -2, -2);
drawPrimitive(PE_IndicatorArrowDown, &tool, painter, widget);
} else if (toolbutton->features & QStyleOptionToolButton::HasMenu
&& !widget->property("noArrow").toBool()) {
&& widget && !widget->property("noArrow").toBool()) {
int arrowSize = 6;
QRect ir = toolbutton->rect.adjusted(1, 1, -1, -1);
QStyleOptionToolButton newBtn = *toolbutton;