You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +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:
@@ -43,10 +43,10 @@ class MeshLibraryEditor : public Control {
|
||||
|
||||
Ref<MeshLibrary> mesh_library;
|
||||
|
||||
MenuButton *menu;
|
||||
ConfirmationDialog *cd_remove;
|
||||
ConfirmationDialog *cd_update;
|
||||
EditorFileDialog *file;
|
||||
MenuButton *menu = nullptr;
|
||||
ConfirmationDialog *cd_remove = nullptr;
|
||||
ConfirmationDialog *cd_update = nullptr;
|
||||
EditorFileDialog *file = nullptr;
|
||||
bool apply_xforms;
|
||||
int to_erase;
|
||||
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
class MeshLibraryEditorPlugin : public EditorPlugin {
|
||||
GDCLASS(MeshLibraryEditorPlugin, EditorPlugin);
|
||||
|
||||
MeshLibraryEditor *mesh_library_editor;
|
||||
MeshLibraryEditor *mesh_library_editor = nullptr;
|
||||
|
||||
public:
|
||||
virtual String get_name() const override { return "MeshLibrary"; }
|
||||
|
||||
Reference in New Issue
Block a user