Skip to content

Commit

Permalink
Merge pull request #49191 from pfertyk/issue-46020-pluginscript-insta…
Browse files Browse the repository at this point in the history
…nce-has-crashes-godot

Check for _language in PluginScript.instance_has
  • Loading branch information
akien-mga authored May 31, 2021
2 parents afe776c + 4b25892 commit 652a9de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/gdnative/pluginscript/pluginscript_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 652a9de

Please sign in to comment.