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:
@ -52,9 +52,9 @@ class EditorResourcePicker : public HBoxContainer {
|
||||
|
||||
Vector<String> inheritors_array;
|
||||
|
||||
Button *assign_button;
|
||||
TextureRect *preview_rect;
|
||||
Button *edit_button;
|
||||
Button *assign_button = nullptr;
|
||||
TextureRect *preview_rect = nullptr;
|
||||
Button *edit_button = nullptr;
|
||||
EditorFileDialog *file_dialog = nullptr;
|
||||
EditorQuickOpen *quick_open = nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user