diff options
| author | Juan Linietsky | 2017-01-12 16:00:14 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2017-01-12 16:00:57 -0300 |
| commit | 6dd7d2c1f79eb2ac8f08785b9d903a01286184f8 (patch) | |
| tree | ca89e65b9566289437d02756350d06267932ad40 /modules/gdscript/gd_script.cpp | |
| parent | 430f3e6043e806a350c82e054395b48367ecb8a7 (diff) | |
| download | godot-6dd7d2c1f79eb2ac8f08785b9d903a01286184f8.tar.gz godot-6dd7d2c1f79eb2ac8f08785b9d903a01286184f8.tar.zst godot-6dd7d2c1f79eb2ac8f08785b9d903a01286184f8.zip | |
Diffstat (limited to 'modules/gdscript/gd_script.cpp')
| -rw-r--r-- | modules/gdscript/gd_script.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index 0b81780b0..ad012e54b 100644 --- a/modules/gdscript/gd_script.cpp +++ b/modules/gdscript/gd_script.cpp @@ -160,6 +160,8 @@ Variant GDScript::_new(const Variant** p_args,int p_argcount,Variant::CallError& _baseptr=_baseptr->_base; } + ERR_FAIL_COND_V(_baseptr->native.is_null(), Variant()); + if (_baseptr->native.ptr()) { owner=_baseptr->native->instance(); } else { |
