diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index e31f399114..c49a17087f 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -691,8 +691,10 @@ void GamePauseScreen::DrawBackground(UIContext &dc) { } GamePauseScreen::~GamePauseScreen() { - g_Config.iCurrentStateSlot = saveSlots_->GetSelection(); - g_Config.Save(); + if (saveSlots_ != NULL) { + g_Config.iCurrentStateSlot = saveSlots_->GetSelection(); + g_Config.Save(); + } } void GamePauseScreen::CreateViews() { diff --git a/UI/MainScreen.h b/UI/MainScreen.h index fc822fb0f4..6e28b3d175 100644 --- a/UI/MainScreen.h +++ b/UI/MainScreen.h @@ -54,7 +54,7 @@ private: class GamePauseScreen : public UIScreen { public: - GamePauseScreen(const std::string &filename) : UIScreen(), gamePath_(filename) {} + GamePauseScreen(const std::string &filename) : UIScreen(), gamePath_(filename), saveSlots_(NULL) {} ~GamePauseScreen(); virtual void key(const KeyInput &key); diff --git a/native b/native index e508a71213..fabb3f66ea 160000 --- a/native +++ b/native @@ -1 +1 @@ -Subproject commit e508a712133a9d8a7084f68e9e3825a044c29265 +Subproject commit fabb3f66ea9251ea11cf6fd0bb717079e8111f8c