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:
@ -447,7 +447,7 @@ public:
|
||||
|
||||
class Directory : public RefCounted {
|
||||
GDCLASS(Directory, RefCounted);
|
||||
DirAccess *d;
|
||||
DirAccess *d = nullptr;
|
||||
|
||||
bool dir_open = false;
|
||||
bool include_navigational = false;
|
||||
|
||||
Reference in New Issue
Block a user