You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +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:
@@ -47,19 +47,19 @@ class AnimationNodeBlendTreeEditor : public AnimationTreeNodeEditorPlugin {
|
||||
GDCLASS(AnimationNodeBlendTreeEditor, AnimationTreeNodeEditorPlugin);
|
||||
|
||||
Ref<AnimationNodeBlendTree> blend_tree;
|
||||
GraphEdit *graph;
|
||||
MenuButton *add_node;
|
||||
GraphEdit *graph = nullptr;
|
||||
MenuButton *add_node = nullptr;
|
||||
Vector2 position_from_popup_menu;
|
||||
bool use_position_from_popup_menu;
|
||||
|
||||
PanelContainer *error_panel;
|
||||
Label *error_label;
|
||||
PanelContainer *error_panel = nullptr;
|
||||
Label *error_label = nullptr;
|
||||
|
||||
UndoRedo *undo_redo;
|
||||
UndoRedo *undo_redo = nullptr;
|
||||
|
||||
AcceptDialog *filter_dialog;
|
||||
Tree *filters;
|
||||
CheckBox *filter_enabled;
|
||||
AcceptDialog *filter_dialog = nullptr;
|
||||
Tree *filters = nullptr;
|
||||
CheckBox *filter_enabled = nullptr;
|
||||
|
||||
Map<StringName, ProgressBar *> animations;
|
||||
Vector<EditorProperty *> visible_properties;
|
||||
@@ -122,7 +122,7 @@ class AnimationNodeBlendTreeEditor : public AnimationTreeNodeEditorPlugin {
|
||||
void _update_editor_settings();
|
||||
void _update_theme();
|
||||
|
||||
EditorFileDialog *open_file;
|
||||
EditorFileDialog *open_file = nullptr;
|
||||
Ref<AnimationNode> file_loaded;
|
||||
void _file_opened(const String &p_file);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user