From cb654a01496e1bdb464630f23c91c38bdc3bcc48 Mon Sep 17 00:00:00 2001 From: elsid Date: Sat, 7 Dec 2024 14:31:50 +0100 Subject: [PATCH] Use navigator in world destructor only when initialized If world initialization fails, mNavigator may be nullptr. --- apps/openmw/mwworld/worldimp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index c541c6003a..bacedcab33 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -602,7 +602,7 @@ namespace MWWorld if (mProjectileManager) mProjectileManager->clear(); - if (Settings::navigator().mWaitForAllJobsOnExit) + if (Settings::navigator().mWaitForAllJobsOnExit && mNavigator != nullptr) { Log(Debug::Verbose) << "Waiting for all navmesh jobs to be done..."; mNavigator->wait(DetourNavigator::WaitConditionType::allJobsDone, nullptr);