Don't crash if we're not editing a course entry.
This commit is contained in:
@@ -1699,6 +1699,8 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
|||||||
case EDIT_BUTTON_OPEN_COURSE_ATTACK_MENU:
|
case EDIT_BUTTON_OPEN_COURSE_ATTACK_MENU:
|
||||||
{
|
{
|
||||||
Course *pCourse = GAMESTATE->m_pCurCourse;
|
Course *pCourse = GAMESTATE->m_pCurCourse;
|
||||||
|
if( pCourse == NULL )
|
||||||
|
break;
|
||||||
CourseEntry &ce = pCourse->m_vEntries[GAMESTATE->m_iEditCourseEntryIndex];
|
CourseEntry &ce = pCourse->m_vEntries[GAMESTATE->m_iEditCourseEntryIndex];
|
||||||
float fStartTime = m_pSong->GetElapsedTimeFromBeat( GAMESTATE->m_fSongBeat );
|
float fStartTime = m_pSong->GetElapsedTimeFromBeat( GAMESTATE->m_fSongBeat );
|
||||||
int iAttack = FindAttackAtTime( ce.attacks, fStartTime );
|
int iAttack = FindAttackAtTime( ce.attacks, fStartTime );
|
||||||
@@ -1730,6 +1732,8 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
|||||||
float fStart, fEnd;
|
float fStart, fEnd;
|
||||||
PlayerOptions po;
|
PlayerOptions po;
|
||||||
const Course *pCourse = GAMESTATE->m_pCurCourse;
|
const Course *pCourse = GAMESTATE->m_pCurCourse;
|
||||||
|
if( pCourse == NULL )
|
||||||
|
break;
|
||||||
const CourseEntry &ce = pCourse->m_vEntries[GAMESTATE->m_iEditCourseEntryIndex];
|
const CourseEntry &ce = pCourse->m_vEntries[GAMESTATE->m_iEditCourseEntryIndex];
|
||||||
|
|
||||||
if( m_NoteFieldEdit.m_iBeginMarker == -1 )
|
if( m_NoteFieldEdit.m_iBeginMarker == -1 )
|
||||||
|
|||||||
Reference in New Issue
Block a user