Skip to content

Commit 1d09ba4

Browse files
committed
Do not crash when accessing icon from qquickcombobox
1 parent e53c795 commit 1d09ba4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

style/adwaitastyle.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4713,7 +4713,7 @@ bool Style::drawComboBoxLabelControl(const QStyleOption *option, QPainter *paint
47134713
QRect editRect = proxy()->subControlRect(CC_ComboBox, cb, SC_ComboBoxEditField, widget);
47144714
painter->save();
47154715
painter->setClipRect(editRect);
4716-
if (!cb->currentIcon.isNull()) {
4716+
if (!cb->currentIcon.isNull() && qobject_cast<const QComboBox *>(widget)) {
47174717
QIcon::Mode mode;
47184718

47194719
if ((cb->state & QStyle::State_Selected) && (cb->state & QStyle::State_Active)) {

0 commit comments

Comments
 (0)