mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:08:13 +00:00
LibGUI: Fix null parent deref in AbstractButton::set_checked()
If a button is orphaned, there are no siblings anyway, so there's no need to try to update them.
This commit is contained in:
parent
3f4df354cb
commit
9baa649389
1 changed files with 1 additions and 1 deletions
|
@ -68,7 +68,7 @@ void AbstractButton::set_checked(bool checked)
|
|||
return;
|
||||
m_checked = checked;
|
||||
|
||||
if (is_exclusive() && checked) {
|
||||
if (is_exclusive() && checked && parent_widget()) {
|
||||
parent_widget()->for_each_child_of_type<AbstractButton>([&](auto& sibling) {
|
||||
if (!sibling.is_exclusive() || !sibling.is_checked())
|
||||
return IterationDecision::Continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue