mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-31 15:32:51 +00:00
WindowServer: Check that a menu is not null
If an application menu is null, WindowServer crashes
This commit is contained in:
parent
5aad6a4378
commit
a67a7229f8
Notes:
sideshowbarker
2024-07-17 18:49:10 +09:00
Author: https://github.com/lorenzoconcas 🔰
Commit: a67a7229f8
Pull-request: https://github.com/SerenityOS/serenity/pull/13931
Reviewed-by: https://github.com/linusg
Reviewed-by: https://github.com/pascalpuffke
1 changed files with 5 additions and 1 deletions
|
@ -178,7 +178,11 @@ void Menu::draw()
|
|||
m_theme_index_at_last_paint = MenuManager::the().theme_index();
|
||||
|
||||
VERIFY(menu_window());
|
||||
VERIFY(menu_window()->backing_store());
|
||||
|
||||
// When an application has an empty menu, we don't want to draw it
|
||||
if (menu_window()->backing_store() == nullptr)
|
||||
return;
|
||||
|
||||
Gfx::Painter painter(*menu_window()->backing_store());
|
||||
|
||||
Gfx::IntRect rect { {}, menu_window()->size() };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue