From 72b5706400360efe6c5243980e849a0bad9a2201 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Wed, 17 Mar 2021 02:55:00 -0700 Subject: [PATCH] Fix crash in CAutoMapper --- Runtime/AutoMapper/CAutoMapper.cpp | 1 + Runtime/AutoMapper/CAutoMapper.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Runtime/AutoMapper/CAutoMapper.cpp b/Runtime/AutoMapper/CAutoMapper.cpp index de0c070e8..d3ec3d039 100644 --- a/Runtime/AutoMapper/CAutoMapper.cpp +++ b/Runtime/AutoMapper/CAutoMapper.cpp @@ -217,6 +217,7 @@ bool CAutoMapper::CheckDummyWorldLoad(CStateManager& mgr) { xa0_curAreaId = aid; dummyWorld->IGetMapWorld()->RecalculateWorldSphere(mwInfo, *dummyWorld); + x24_world = dummyWorld.get(); BeginMapperStateTransition(EAutoMapperState::MapScreen, mgr); x32c_loadingDummyWorld = false; return true; diff --git a/Runtime/AutoMapper/CAutoMapper.hpp b/Runtime/AutoMapper/CAutoMapper.hpp index ac93ab3fc..063f57f10 100644 --- a/Runtime/AutoMapper/CAutoMapper.hpp +++ b/Runtime/AutoMapper/CAutoMapper.hpp @@ -128,7 +128,7 @@ private: ELoadPhase x4_loadPhase = ELoadPhase::LoadResources; TLockedToken x8_mapu; std::vector> x14_dummyWorlds; - CWorld* x24_world; + IWorld* x24_world; TLockedToken x28_frmeMapScreen; // Used to be ptr bool m_frmeInitialized = false; TLockedToken x30_miniMapSamus;