From 30ef5d071e63af15e13248df0e56efb05841f79e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 14 Aug 2005 00:54:21 +0000 Subject: [PATCH] InitMenu in BeginScreen, not Init; fixes crashes on preload (when the screen is loaded, no profile is selected) --- stepmania/src/ScreenOptionsEditProfile.cpp | 5 +++++ stepmania/src/ScreenOptionsEditProfile.h | 1 + 2 files changed, 6 insertions(+) diff --git a/stepmania/src/ScreenOptionsEditProfile.cpp b/stepmania/src/ScreenOptionsEditProfile.cpp index 1724411a8d..5d178a303f 100644 --- a/stepmania/src/ScreenOptionsEditProfile.cpp +++ b/stepmania/src/ScreenOptionsEditProfile.cpp @@ -25,7 +25,10 @@ ScreenOptionsEditProfile::ScreenOptionsEditProfile( CString sName ) : void ScreenOptionsEditProfile::Init() { ScreenOptions::Init(); +} +void ScreenOptionsEditProfile::BeginScreen() +{ m_Original = *GAMESTATE->GetEditLocalProfile(); vector vDefs; @@ -53,6 +56,8 @@ void ScreenOptionsEditProfile::Init() } InitMenu( vDefs, vHands ); + + ScreenOptions::BeginScreen(); } ScreenOptionsEditProfile::~ScreenOptionsEditProfile() diff --git a/stepmania/src/ScreenOptionsEditProfile.h b/stepmania/src/ScreenOptionsEditProfile.h index 1bfa095022..fbafe00df8 100644 --- a/stepmania/src/ScreenOptionsEditProfile.h +++ b/stepmania/src/ScreenOptionsEditProfile.h @@ -11,6 +11,7 @@ public: virtual ~ScreenOptionsEditProfile(); virtual void Init(); + virtual void BeginScreen(); protected: private: