mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 21:07:36 +00:00
LibGUI: Don't crash when updating menu item that's not in the window server (#83)
Don't crash when updating menu item that's not in the window server. Menu Items begin with an invalid ID of -1, and only get a valid ID if the menu they are attached to is added to the window server. They don't send updates to the server unless they have a valid ID. Fixes #82
This commit is contained in:
parent
ebf645d72a
commit
9823354754
4 changed files with 7 additions and 2 deletions
|
@ -33,7 +33,7 @@ private:
|
|||
int realize_menu();
|
||||
void unrealize_menu();
|
||||
|
||||
int m_menu_id { 0 };
|
||||
int m_menu_id { -1 };
|
||||
String m_name;
|
||||
Vector<OwnPtr<GMenuItem>> m_items;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue