From 65c9cf0de1d06cd0e1165196b3c0ca5baf793a8e Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Mon, 6 Jun 2005 00:59:37 +0000 Subject: [PATCH] fix AV if selecting a background row that has no choices --- stepmania/src/ScreenEdit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 5963049c48..952491d561 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -2757,7 +2757,7 @@ void ScreenEdit::HandleBGChangeChoice( BGChangeChoice c, const vector &iAns case global_movie_song_group_and_genre: { BGChangeChoice row1 = (BGChangeChoice)(file1_song_bganimation + iAnswers[file1_type]); - newChange.m_def.m_sFile1 = g_BackgroundChange.rows[row1].choices[iAnswers[row1]]; + newChange.m_def.m_sFile1 = g_BackgroundChange.rows[row1].choices.empty() ? "" : g_BackgroundChange.rows[row1].choices[iAnswers[row1]]; } break; } @@ -2776,7 +2776,7 @@ void ScreenEdit::HandleBGChangeChoice( BGChangeChoice c, const vector &iAns case global_movie_song_group_and_genre: { BGChangeChoice row2 = (BGChangeChoice)(file2_song_bganimation + iAnswers[file2_type]); - newChange.m_def.m_sFile2 = g_BackgroundChange.rows[row2].choices[iAnswers[row2]]; + newChange.m_def.m_sFile2 = g_BackgroundChange.rows[row2].choices.empty() ? "" : g_BackgroundChange.rows[row2].choices[iAnswers[row2]]; } break; }