You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Fixed ~CSharpScript() holding on to a mutex longer than necessary, creating potential for a deadlock.
This commit is contained in:
@@ -2855,15 +2855,17 @@ CSharpScript::CSharpScript() {
|
||||
#ifdef DEBUG_ENABLED
|
||||
{
|
||||
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
|
||||
}
|
||||
|
||||
CSharpScript::~CSharpScript() {
|
||||
#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
|
||||
|
||||
if (GDMonoCache::godot_api_cache_updated) {
|
||||
|
||||
Reference in New Issue
Block a user