Prevent a deadlock between View::eventMutex_ and ScreenManager::inputMutex_ by locking here so the reverse lock order can't happen.

This commit is contained in:
Henrik Rydgård 2017-05-18 14:37:42 +02:00
parent d0613511b2
commit 2f5ea23a8a

View file

@ -39,6 +39,7 @@ void ScreenManager::switchScreen(Screen *screen) {
}
void ScreenManager::update() {
std::lock_guard<std::recursive_mutex> guard(inputLock_);
if (nextScreen_) {
switchToNext();
}