mirror of
https://github.com/godotengine/godot.git
synced 2024-12-03 09:52:18 +08:00
Simplify RefCounted check in free()
This commit is contained in:
parent
1952f64b07
commit
2de8bc00a1
@ -728,7 +728,7 @@ Variant Object::callp(const StringName &p_method, const Variant **p_args, int p_
|
|||||||
r_error.expected = 0;
|
r_error.expected = 0;
|
||||||
return Variant();
|
return Variant();
|
||||||
}
|
}
|
||||||
if (Object::cast_to<RefCounted>(this)) {
|
if (is_ref_counted()) {
|
||||||
r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
|
r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
|
||||||
ERR_FAIL_V_MSG(Variant(), "Can't 'free' a reference.");
|
ERR_FAIL_V_MSG(Variant(), "Can't 'free' a reference.");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user