You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-24 15:26:15 +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:
@@ -40,11 +40,11 @@ class EditorFileDialog;
|
||||
class OccluderInstance3DEditorPlugin : public EditorPlugin {
|
||||
GDCLASS(OccluderInstance3DEditorPlugin, EditorPlugin);
|
||||
|
||||
OccluderInstance3D *occluder_instance;
|
||||
OccluderInstance3D *occluder_instance = nullptr;
|
||||
|
||||
Button *bake;
|
||||
Button *bake = nullptr;
|
||||
|
||||
EditorFileDialog *file_dialog;
|
||||
EditorFileDialog *file_dialog = nullptr;
|
||||
|
||||
void _bake_select_file(const String &p_file);
|
||||
void _bake();
|
||||
|
||||
Reference in New Issue
Block a user