mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
[NativeScript] replace error macros by simple returns
This commit is contained in:
parent
eaa5dfbdbd
commit
2e1f239fe6
@ -339,13 +339,11 @@ const void GDAPI *godot_nativescript_get_type_tag(const godot_object *p_object)
|
||||
const Object *o = (Object *)p_object;
|
||||
|
||||
if (!o->get_script_instance()) {
|
||||
ERR_EXPLAIN("Attempted to get type tag on an object without a script!");
|
||||
ERR_FAIL_V(NULL);
|
||||
return NULL;
|
||||
} else {
|
||||
NativeScript *script = Object::cast_to<NativeScript>(o->get_script_instance()->get_script().ptr());
|
||||
if (!script) {
|
||||
ERR_EXPLAIN("Attempted to get type tag on an object without a nativescript attached");
|
||||
ERR_FAIL_V(NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (script->get_script_desc())
|
||||
|
Loading…
Reference in New Issue
Block a user