diff options
| author | Rémi Verschelde | 2018-04-06 07:55:50 +0200 |
|---|---|---|
| committer | GitHub | 2018-04-06 07:55:50 +0200 |
| commit | 31fd1b7711aa4c6f91181e2d9bf00f2261d2b79c (patch) | |
| tree | a171a2552d5875c3114d8360a1480b599f3a1409 | |
| parent | 5d4b9c080a25a9c9a410911a7f23b6feeda57044 (diff) | |
| parent | 2e1f239fe63aefc4b6f266d1135a734e1fdadfd9 (diff) | |
| download | godot-31fd1b7711aa4c6f91181e2d9bf00f2261d2b79c.tar.gz godot-31fd1b7711aa4c6f91181e2d9bf00f2261d2b79c.tar.zst godot-31fd1b7711aa4c6f91181e2d9bf00f2261d2b79c.zip | |
| -rw-r--r-- | modules/gdnative/nativescript/godot_nativescript.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/gdnative/nativescript/godot_nativescript.cpp b/modules/gdnative/nativescript/godot_nativescript.cpp index 593ff34a6..ace2ecac5 100644 --- a/modules/gdnative/nativescript/godot_nativescript.cpp +++ b/modules/gdnative/nativescript/godot_nativescript.cpp @@ -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()) |
