You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix: Func with typed args error when arg is null
This commit is contained in:
@@ -105,9 +105,10 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
Object *obj = p_variant.get_validated_object();
|
||||
bool was_freed = false;
|
||||
Object *obj = p_variant.get_validated_object_with_check(was_freed);
|
||||
if (!obj) {
|
||||
return false;
|
||||
return !was_freed;
|
||||
}
|
||||
|
||||
if (!ClassDB::is_parent_class(obj->get_class_name(), native_type)) {
|
||||
@@ -124,9 +125,10 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
Object *obj = p_variant.get_validated_object();
|
||||
bool was_freed = false;
|
||||
Object *obj = p_variant.get_validated_object_with_check(was_freed);
|
||||
if (!obj) {
|
||||
return false;
|
||||
return !was_freed;
|
||||
}
|
||||
|
||||
Ref<Script> base = obj && obj->get_script_instance() ? obj->get_script_instance()->get_script() : nullptr;
|
||||
|
||||
Reference in New Issue
Block a user