mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-22 23:55:12 +00:00
WindowServer: Check that a menu is not null
If an application menu is null, WindowServer crashes
This commit is contained in:
committed by
Linus Groh
parent
5aad6a4378
commit
a67a7229f8
@@ -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() };
|
||||
|
||||
Reference in New Issue
Block a user