Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
None
-
5.12.2
-
None
Description
Add missing null check in QAbstractButtonPrivate::queryButtonList()
This code path can be reached by
QCheckBox cb; cb.setChecked(true); cb.setChecked(false);
Fix:
QList<QAbstractButton *>QAbstractButtonPrivate::queryButtonList() const { #if QT_CONFIG(buttongroup) if (group) return group->d_func()->buttonList; #endif +if (!parent) return {}; + QList<QAbstractButton*>candidates = parent->findChildren<QAbstractButton *>(); if (autoExclusive) { auto isNoMemberOfMyAutoExclusiveGroup = [](QAbstractButton *candidate) { return !candidate->autoExclusive() #if QT_CONFIG(buttongroup)