You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +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:
@@ -430,11 +430,11 @@ public:
|
||||
extern uint8_t script_encryption_key[32];
|
||||
|
||||
class PlaceHolderScriptInstance : public ScriptInstance {
|
||||
Object *owner;
|
||||
Object *owner = nullptr;
|
||||
List<PropertyInfo> properties;
|
||||
Map<StringName, Variant> values;
|
||||
Map<StringName, Variant> constants;
|
||||
ScriptLanguage *language;
|
||||
ScriptLanguage *language = nullptr;
|
||||
Ref<Script> script;
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user