diff options
author | Paweł Fertyk <pfertyk@pfertyk.me> | 2021-05-29 18:12:26 +0200 |
---|---|---|
committer | Paweł Fertyk <pfertyk@pfertyk.me> | 2021-05-30 22:21:26 +0200 |
commit | 4b258925012a56eaa9d19bfbca101392f4b81490 (patch) | |
tree | 07db954d547bb62ee5b78d8774c9aefe271e5bed /modules/gdnative/pluginscript/pluginscript_script.cpp | |
parent | da12086ceb21454aa505847ce4c3c1478c5a4ea6 (diff) |
Check for _language in PluginScript.instance_has
Diffstat (limited to 'modules/gdnative/pluginscript/pluginscript_script.cpp')
-rw-r--r-- | modules/gdnative/pluginscript/pluginscript_script.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/gdnative/pluginscript/pluginscript_script.cpp b/modules/gdnative/pluginscript/pluginscript_script.cpp index 93fe3b3992..a48245814f 100644 --- a/modules/gdnative/pluginscript/pluginscript_script.cpp +++ b/modules/gdnative/pluginscript/pluginscript_script.cpp @@ -212,6 +212,8 @@ ScriptInstance *PluginScript::instance_create(Object *p_this) { } bool PluginScript::instance_has(const Object *p_this) const { + ERR_FAIL_COND_V(!_language, false); + _language->lock(); bool hasit = _instances.has((Object *)p_this); _language->unlock(); |