From 7463c0c3530755567fff14eba029eaed7d875050 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 13 Mar 2016 23:47:57 +0100 Subject: [PATCH] Addition to last commit, don't create a save directory on death --- apps/openmw/mwstate/statemanagerimp.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwstate/statemanagerimp.cpp b/apps/openmw/mwstate/statemanagerimp.cpp index 1759cdf54..8f0b3b74b 100644 --- a/apps/openmw/mwstate/statemanagerimp.cpp +++ b/apps/openmw/mwstate/statemanagerimp.cpp @@ -109,13 +109,14 @@ void MWState::StateManager::askLoadRecent() if( !mAskLoadRecent ) { - if(getCurrentCharacter()->begin() == getCurrentCharacter()->end() )//no saves + const MWState::Character* character = getCurrentCharacter(false); + if(!character || character->begin() == character->end())//no saves { MWBase::Environment::get().getWindowManager()->pushGuiMode (MWGui::GM_MainMenu); } else { - MWState::Slot lastSave = *getCurrentCharacter()->begin(); + MWState::Slot lastSave = *character->begin(); std::vector buttons; buttons.push_back("#{sYes}"); buttons.push_back("#{sNo}");