Check for _language in PluginScript.instance_has

(cherry picked from commit 4b25892501)
This commit is contained in:
Paweł Fertyk 2021-05-29 18:12:26 +02:00 committed by Rémi Verschelde
parent 65d9992fb6
commit 3b29aac348
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 2 additions and 0 deletions

View File

@ -204,6 +204,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();