From 62815d8f588c3e6206618f210a1d549b57d1a4fc Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 23 Apr 2011 16:59:38 -0500 Subject: [PATCH] [ScreenOptionsEditCourse] Fixed a crash when going to the first row. (Fixes issue 235) --- Docs/Changelog_sm-ssc.txt | 1 + src/ScreenOptionsEditCourse.cpp | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index d585f0c39c..6bb4bc4051 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -19,6 +19,7 @@ sm-ssc v1.2.5 | 201104?? probably others too. [AJ] * [ScreenGameplaySyncMachine] Fixed a crash when entering ScreenGameplaySyncMachine as Player 2. (Fixes issue 127) [AJ] +* [ScreenOptionsEditCourse] Fixed a crash when going to the first row. (Fixes issue 235) [AJ] 20110422 -------- diff --git a/src/ScreenOptionsEditCourse.cpp b/src/ScreenOptionsEditCourse.cpp index e9b0589b88..b55a4152a1 100644 --- a/src/ScreenOptionsEditCourse.cpp +++ b/src/ScreenOptionsEditCourse.cpp @@ -447,8 +447,13 @@ void ScreenOptionsEditCourse::AfterChangeRow( PlayerNumber pn ) { ScreenOptions::AfterChangeRow( pn ); - SetCurrentSong(); - SetCurrentSteps(); + const int iCurRow = m_iCurrentRow[pn]; + // only do this if it's not the first row. -aj + if( iCurRow > 0 ) + { + SetCurrentSong(); + SetCurrentSteps(); + } } void ScreenOptionsEditCourse::AfterChangeValueInRow( int iRow, PlayerNumber pn )