From 4b258925012a56eaa9d19bfbca101392f4b81490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Fertyk?= Date: Sat, 29 May 2021 18:12:26 +0200 Subject: Check for _language in PluginScript.instance_has --- modules/gdnative/pluginscript/pluginscript_script.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/gdnative/pluginscript/pluginscript_script.cpp') 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(); -- cgit v1.2.3