From 155b07f341ab347c7c2f82d8e976ff8cbc5210f4 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Sun, 12 Nov 2023 12:09:54 +0400 Subject: [PATCH] Do not update WindowManager by world data when there is no game --- apps/openmw/engine.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index c8c1ada5a9..92483bd8c3 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -318,9 +318,14 @@ bool OMW::Engine::frame(float frametime) mViewer->eventTraversal(); mViewer->updateTraversal(); + // update GUI by world data { ScopedProfile profile(frameStart, frameNumber, *timer, *stats); - mWorld->updateWindowManager(); + + if (mStateManager->getState() != MWBase::StateManager::State_NoGame) + { + mWorld->updateWindowManager(); + } } mLuaWorker->allowUpdate(); // if there is a separate Lua thread, it starts the update now