mirror of
https://github.com/godotengine/godot
synced 2024-09-16 01:20:26 +00:00
Fixed ~CSharpScript() holding on to a mutex longer than necessary, creating potential for a deadlock.
This commit is contained in:
parent
17e7f85c06
commit
9d50a486bf
|
@ -2855,15 +2855,17 @@ CSharpScript::CSharpScript() {
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
{
|
{
|
||||||
MutexLock lock(CSharpLanguage::get_singleton()->script_instances_mutex);
|
MutexLock lock(CSharpLanguage::get_singleton()->script_instances_mutex);
|
||||||
CSharpLanguage::get_singleton()->script_list.add(&this->script_list);
|
CSharpLanguage::get_singleton()->script_list.add(&script_list);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
CSharpScript::~CSharpScript() {
|
CSharpScript::~CSharpScript() {
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
MutexLock lock(CSharpLanguage::get_singleton()->script_instances_mutex);
|
{
|
||||||
CSharpLanguage::get_singleton()->script_list.remove(&this->script_list);
|
MutexLock lock(CSharpLanguage::get_singleton()->script_instances_mutex);
|
||||||
|
CSharpLanguage::get_singleton()->script_list.remove(&script_list);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (GDMonoCache::godot_api_cache_updated) {
|
if (GDMonoCache::godot_api_cache_updated) {
|
||||||
|
|
Loading…
Reference in a new issue