[Localization] Fix demos by locking the mutex only when necessary
This commit is contained in:
parent
92b0dcffff
commit
001939166b
@ -49,6 +49,7 @@ namespace Components
|
||||
if (!Localization::UseLocalization.get<bool>()) return key;
|
||||
|
||||
Game::LocalizeEntry* entry = nullptr;
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> _(Localization::LocalizeMutex);
|
||||
|
||||
if (Localization::TempLocalizeMap.find(key) != Localization::TempLocalizeMap.end())
|
||||
@ -59,6 +60,7 @@ namespace Components
|
||||
{
|
||||
entry = Localization::LocalizeMap[key];
|
||||
}
|
||||
}
|
||||
|
||||
if (!entry || !entry->value)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user