Skip to content

Commit 7a620e3

Browse files
committed
Merge pull request #65415 from akien-mga/fix-uninitialized-member-pointers
Fix various uninitialized member pointers
2 parents 042278c + 7b5d1ea commit 7a620e3

8 files changed

+22
-22
lines changed

drivers/gles3/rasterizer_scene_gles3.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ class RasterizerSceneGLES3 : public RendererSceneRender {
597597
public:
598598
static RasterizerSceneGLES3 *get_singleton() { return singleton; }
599599

600-
RasterizerCanvasGLES3 *canvas;
600+
RasterizerCanvasGLES3 *canvas = nullptr;
601601

602602
RenderGeometryInstance *geometry_instance_create(RID p_base) override;
603603
void geometry_instance_free(RenderGeometryInstance *p_geometry_instance) override;

editor/editor_properties_array_dict.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class EditorPropertyDictionary : public EditorProperty {
151151
Button *edit = nullptr;
152152
MarginContainer *container = nullptr;
153153
VBoxContainer *property_vbox = nullptr;
154-
EditorSpinSlider *size_sliderv;
154+
EditorSpinSlider *size_sliderv = nullptr;
155155
Button *button_add_item = nullptr;
156156
EditorPaginator *paginator = nullptr;
157157

editor/import/scene_import_settings.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ class SceneImportSettings : public ConfirmationDialog {
192192

193193
bool editing_animation = false;
194194

195-
Timer *update_view_timer;
195+
Timer *update_view_timer = nullptr;
196196

197197
protected:
198198
void _notification(int p_what);

editor/plugins/animation_state_machine_editor.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin {
100100

101101
Vector2 add_node_pos;
102102

103-
ConfirmationDialog *delete_window;
104-
Tree *delete_tree;
103+
ConfirmationDialog *delete_window = nullptr;
104+
Tree *delete_tree = nullptr;
105105

106106
bool box_selecting = false;
107107
Point2 box_selecting_from;

editor/plugins/bone_map_editor_plugin.h

+14-14
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class BoneMapperButton : public TextureButton {
6262
bool selected = false;
6363
bool require = false;
6464

65-
TextureRect *circle;
65+
TextureRect *circle = nullptr;
6666

6767
void fetch_textures();
6868

@@ -87,8 +87,8 @@ class BoneMapperItem : public VBoxContainer {
8787

8888
Ref<BoneMap> bone_map;
8989

90-
EditorPropertyText *skeleton_bone_selector;
91-
Button *picker_button;
90+
EditorPropertyText *skeleton_bone_selector = nullptr;
91+
Button *picker_button = nullptr;
9292

9393
void _update_property();
9494
void _open_picker();
@@ -135,24 +135,24 @@ class BonePicker : public AcceptDialog {
135135
class BoneMapper : public VBoxContainer {
136136
GDCLASS(BoneMapper, VBoxContainer);
137137

138-
Skeleton3D *skeleton;
138+
Skeleton3D *skeleton = nullptr;
139139
Ref<BoneMap> bone_map;
140140

141-
EditorPropertyResource *profile_selector;
141+
EditorPropertyResource *profile_selector = nullptr;
142142

143143
Vector<BoneMapperItem *> bone_mapper_items;
144144

145-
Button *clear_mapping_button;
145+
Button *clear_mapping_button = nullptr;
146146

147-
VBoxContainer *mapper_item_vbox;
147+
VBoxContainer *mapper_item_vbox = nullptr;
148148

149149
int current_group_idx = 0;
150150
int current_bone_idx = -1;
151151

152-
AspectRatioContainer *bone_mapper_field;
153-
EditorPropertyEnum *profile_group_selector;
154-
ColorRect *profile_bg;
155-
TextureRect *profile_texture;
152+
AspectRatioContainer *bone_mapper_field = nullptr;
153+
EditorPropertyEnum *profile_group_selector = nullptr;
154+
ColorRect *profile_bg = nullptr;
155+
TextureRect *profile_texture = nullptr;
156156
Vector<BoneMapperButton *> bone_mapper_buttons;
157157

158158
void create_editor();
@@ -201,9 +201,9 @@ class BoneMapper : public VBoxContainer {
201201
class BoneMapEditor : public VBoxContainer {
202202
GDCLASS(BoneMapEditor, VBoxContainer);
203203

204-
Skeleton3D *skeleton;
204+
Skeleton3D *skeleton = nullptr;
205205
Ref<BoneMap> bone_map;
206-
BoneMapper *bone_mapper;
206+
BoneMapper *bone_mapper = nullptr;
207207

208208
void fetch_objects();
209209
void clear_editors();
@@ -219,7 +219,7 @@ class BoneMapEditor : public VBoxContainer {
219219

220220
class EditorInspectorPluginBoneMap : public EditorInspectorPlugin {
221221
GDCLASS(EditorInspectorPluginBoneMap, EditorInspectorPlugin);
222-
BoneMapEditor *editor;
222+
BoneMapEditor *editor = nullptr;
223223

224224
public:
225225
virtual bool can_handle(Object *p_object) override;

editor/plugins/cast_2d_editor_plugin.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Cast2DEditor : public Control {
4242

4343
Ref<EditorUndoRedoManager> undo_redo;
4444
CanvasItemEditor *canvas_item_editor = nullptr;
45-
Node2D *node;
45+
Node2D *node = nullptr;
4646

4747
bool pressed = false;
4848
Point2 original_target_position;

editor/plugins/control_editor_plugin.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ class AnchorPresetPicker : public ControlEditorPresetPicker {
186186
class SizeFlagPresetPicker : public ControlEditorPresetPicker {
187187
GDCLASS(SizeFlagPresetPicker, ControlEditorPresetPicker);
188188

189-
CheckBox *expand_button;
189+
CheckBox *expand_button = nullptr;
190190

191191
bool vertical = false;
192192

editor/plugins/navigation_link_2d_editor_plugin.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class NavigationLink2DEditor : public Control {
4242

4343
Ref<EditorUndoRedoManager> undo_redo;
4444
CanvasItemEditor *canvas_item_editor = nullptr;
45-
NavigationLink2D *node;
45+
NavigationLink2D *node = nullptr;
4646

4747
bool start_grabbed = false;
4848
Vector2 original_start_location;

0 commit comments

Comments
 (0)