Skip to content

Commit 07ad3a2

Browse files
committed
Fix thread-safety issues around armok mode logic
1 parent 635f143 commit 07ad3a2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/Core.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2382,10 +2382,12 @@ void Core::setSuppressDuplicateKeyboardEvents(bool suppress) {
23822382
}
23832383

23842384
void Core::setMortalMode(bool value) {
2385+
std::lock_guard<std::mutex> lock(HotkeyMutex);
23852386
mortal_mode = value;
23862387
}
23872388

23882389
void Core::setArmokTools(const std::vector<std::string> &tool_names) {
2390+
std::lock_guard<std::mutex> lock(HotkeyMutex);
23892391
armok_tools.clear();
23902392
armok_tools.insert(tool_names.begin(), tool_names.end());
23912393
}

0 commit comments

Comments
 (0)