Fixed a crash on exiting from win scene to level list

master
krzys-h 2015-07-20 17:06:28 +02:00
parent e2ebcb769e
commit 572b8ea566
2 changed files with 12 additions and 2 deletions

View File

@ -148,6 +148,7 @@ CMainDialog::CMainDialog()
}
m_category = LevelCategory::Exercises;
m_listCategory = m_category;
m_maxList = 0;
m_bTooltip = true;
@ -715,6 +716,15 @@ void CMainDialog::ChangePhase(Phase phase)
if ( m_phase == PHASE_LEVEL_LIST )
{
if ( static_cast<int>(m_category) >= static_cast<int>(LevelCategory::Max) )
{
m_category = m_listCategory;
}
else
{
m_listCategory = m_category;
}
if ( m_category == LevelCategory::FreeGame )
{
m_accessChap = m_main->GetPlayerProfile()->GetChapPassed(LevelCategory::Missions);
@ -5234,7 +5244,6 @@ void CMainDialog::ChangeSetupQuality(int quality)
{
bool bEnable;
float value;
int iValue;
bEnable = (quality >= 0);
m_engine->SetShadow(bEnable);

View File

@ -161,7 +161,8 @@ protected:
int m_apperanceTab; // perso: tab selected
float m_apperanceAngle; // perso: angle of presentation
LevelCategory m_category; // 0..4
LevelCategory m_category;
LevelCategory m_listCategory;
std::map<LevelCategory, int> m_chap; // selected chapter (0..8)
std::map<LevelCategory, int> m_sel; // chosen mission (0..98)
int m_maxList;