Use navigator in world destructor only when initialized

If world initialization fails, mNavigator may be nullptr.
master
elsid 3 weeks ago
parent c207397c56
commit cb654a0149
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

@ -602,7 +602,7 @@ namespace MWWorld
if (mProjectileManager) if (mProjectileManager)
mProjectileManager->clear(); mProjectileManager->clear();
if (Settings::navigator().mWaitForAllJobsOnExit) if (Settings::navigator().mWaitForAllJobsOnExit && mNavigator != nullptr)
{ {
Log(Debug::Verbose) << "Waiting for all navmesh jobs to be done..."; Log(Debug::Verbose) << "Waiting for all navmesh jobs to be done...";
mNavigator->wait(DetourNavigator::WaitConditionType::allJobsDone, nullptr); mNavigator->wait(DetourNavigator::WaitConditionType::allJobsDone, nullptr);

Loading…
Cancel
Save