mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 12:12:45 +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
					
				
					 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
	
	 Lorenzo Concas
						Lorenzo Concas