You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +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:
@@ -41,11 +41,11 @@ class EditorFileDialog;
|
||||
class LightmapGIEditorPlugin : public EditorPlugin {
|
||||
GDCLASS(LightmapGIEditorPlugin, EditorPlugin);
|
||||
|
||||
LightmapGI *lightmap;
|
||||
LightmapGI *lightmap = nullptr;
|
||||
|
||||
Button *bake;
|
||||
Button *bake = nullptr;
|
||||
|
||||
EditorFileDialog *file_dialog;
|
||||
EditorFileDialog *file_dialog = nullptr;
|
||||
static EditorProgress *tmp_progress;
|
||||
static bool bake_func_step(float p_progress, const String &p_description, void *, bool p_refresh);
|
||||
static void bake_func_end(uint64_t p_time_started);
|
||||
|
||||
Reference in New Issue
Block a user