Skip to content

Commit

Permalink
Remove a misleading MutexAutoLock in l_to_table
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Desour authored and sfan5 committed Jun 5, 2023
1 parent 252c79d commit d9f478c
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/script/lua_api/l_settings.cpp
Expand Up @@ -332,7 +332,6 @@ int LuaSettings::l_to_table(lua_State* L)
NO_MAP_LOCK_REQUIRED;
LuaSettings* o = checkObject<LuaSettings>(L, 1);

MutexAutoLock(o->m_settings->m_mutex);
push_settings_table(L, o->m_settings);
return 1;
}
Expand Down

0 comments on commit d9f478c

Please sign in to comment.