You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
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:
@@ -56,26 +56,26 @@ class GPUParticles2DEditorPlugin : public EditorPlugin {
|
||||
EMISSION_MODE_BORDER_DIRECTED
|
||||
};
|
||||
|
||||
GPUParticles2D *particles;
|
||||
GPUParticles2D *particles = nullptr;
|
||||
List<GPUParticles2D *> selected_particles;
|
||||
|
||||
EditorFileDialog *file;
|
||||
EditorFileDialog *file = nullptr;
|
||||
|
||||
HBoxContainer *toolbar;
|
||||
MenuButton *menu;
|
||||
HBoxContainer *toolbar = nullptr;
|
||||
MenuButton *menu = nullptr;
|
||||
|
||||
SpinBox *epoints;
|
||||
SpinBox *epoints = nullptr;
|
||||
|
||||
ConfirmationDialog *generate_visibility_rect;
|
||||
SpinBox *generate_seconds;
|
||||
ConfirmationDialog *generate_visibility_rect = nullptr;
|
||||
SpinBox *generate_seconds = nullptr;
|
||||
|
||||
ConfirmationDialog *emission_mask;
|
||||
OptionButton *emission_mask_mode;
|
||||
CheckBox *emission_colors;
|
||||
ConfirmationDialog *emission_mask = nullptr;
|
||||
OptionButton *emission_mask_mode = nullptr;
|
||||
CheckBox *emission_colors = nullptr;
|
||||
|
||||
String source_emission_file;
|
||||
|
||||
UndoRedo *undo_redo;
|
||||
UndoRedo *undo_redo = nullptr;
|
||||
void _file_selected(const String &p_file);
|
||||
void _menu_callback(int p_idx);
|
||||
void _generate_visibility_rect();
|
||||
|
||||
Reference in New Issue
Block a user