1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-18 14:21:41 +00:00

Core: Сheck r_error after calling callp()

This commit is contained in:
Danil Alexeev
2024-08-30 21:09:30 +03:00
parent a5830f6eb9
commit 49bcdf78a7
7 changed files with 18 additions and 14 deletions

View File

@@ -2113,7 +2113,7 @@ Variant::operator ::RID() const {
}
#endif
Callable::CallError ce;
Variant ret = _get_obj().obj->callp(CoreStringName(get_rid), nullptr, 0, ce);
const Variant ret = _get_obj().obj->callp(CoreStringName(get_rid), nullptr, 0, ce);
if (ce.error == Callable::CallError::CALL_OK && ret.get_type() == Variant::RID) {
return ret;
}