Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
This commit is contained in:
@ -40,7 +40,7 @@ class MenuButton : public Button {
|
||||
bool clicked = false;
|
||||
bool switch_on_hover = false;
|
||||
bool disable_shortcuts = false;
|
||||
PopupMenu *popup;
|
||||
PopupMenu *popup = nullptr;
|
||||
|
||||
Vector2i mouse_pos_adjusted;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user