fix AV if selecting a background row that has no choices

This commit is contained in:
Chris Danford
2005-06-06 00:59:37 +00:00
parent b489c43a88
commit 65c9cf0de1
+2 -2
View File
@@ -2757,7 +2757,7 @@ void ScreenEdit::HandleBGChangeChoice( BGChangeChoice c, const vector<int> &iAns
case global_movie_song_group_and_genre: case global_movie_song_group_and_genre:
{ {
BGChangeChoice row1 = (BGChangeChoice)(file1_song_bganimation + iAnswers[file1_type]); 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; break;
} }
@@ -2776,7 +2776,7 @@ void ScreenEdit::HandleBGChangeChoice( BGChangeChoice c, const vector<int> &iAns
case global_movie_song_group_and_genre: case global_movie_song_group_and_genre:
{ {
BGChangeChoice row2 = (BGChangeChoice)(file2_song_bganimation + iAnswers[file2_type]); 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; break;
} }