From d9f478cbfba93dc972a1374b9178f209483fa4dc Mon Sep 17 00:00:00 2001 From: Desour Date: Sat, 27 May 2023 07:37:05 +0200 Subject: [PATCH] Remove a misleading MutexAutoLock in l_to_table The temporary is immediately destructed, so the mutex isn't locked after the line. Removed the lock, because the Settings member-functions used by push_settings_table lock the mutex and are thread-safe, but would cause a dead-lock. --- src/script/lua_api/l_settings.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/script/lua_api/l_settings.cpp b/src/script/lua_api/l_settings.cpp index cd79124f63cc..ee46c3fdd8fc 100644 --- a/src/script/lua_api/l_settings.cpp +++ b/src/script/lua_api/l_settings.cpp @@ -332,7 +332,6 @@ int LuaSettings::l_to_table(lua_State* L) NO_MAP_LOCK_REQUIRED; LuaSettings* o = checkObject(L, 1); - MutexAutoLock(o->m_settings->m_mutex); push_settings_table(L, o->m_settings); return 1; }