mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibGUI: Don't crash when rendering a collapsible toolbar with no items
This prevents a crash in GML Playground that would occur when previewing a GUI with a collapsible toolbar.
This commit is contained in:
parent
6876c62110
commit
6290f96aa7
Notes:
sideshowbarker
2024-07-17 11:06:06 +09:00
Author: https://github.com/tcl3 Commit: https://github.com/SerenityOS/serenity/commit/6290f96aa7 Pull-request: https://github.com/SerenityOS/serenity/pull/24333 Issue: https://github.com/SerenityOS/serenity/issues/24303
1 changed files with 1 additions and 1 deletions
|
@ -165,7 +165,7 @@ ErrorOr<void> Toolbar::create_overflow_objects()
|
|||
|
||||
ErrorOr<void> Toolbar::update_overflow_menu()
|
||||
{
|
||||
if (!m_collapsible)
|
||||
if (!m_collapsible || m_items.is_empty())
|
||||
return {};
|
||||
|
||||
Optional<size_t> marginal_index {};
|
||||
|
|
Loading…
Reference in a new issue