mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 14:28:49 +00:00
LibGUI: Add missing window() null check when widget's child is removed
Before notifying our window that a child was removed, we should first check that we actually have a window! :^)
This commit is contained in:
parent
9d6c85e6a6
commit
575b674081
Notes:
sideshowbarker
2024-07-19 06:42:52 +09:00
Author: https://github.com/awesomekling
Commit: 575b674081
1 changed files with 1 additions and 1 deletions
|
@ -123,7 +123,7 @@ void Widget::child_event(Core::ChildEvent& event)
|
|||
else
|
||||
invalidate_layout();
|
||||
}
|
||||
if (event.child() && Core::is<Widget>(*event.child()))
|
||||
if (window() && event.child() && Core::is<Widget>(*event.child()))
|
||||
window()->did_remove_widget({}, Core::to<Widget>(*event.child()));
|
||||
update();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue