Fix attack removing crash if no attacks.

This commit is contained in:
Jason Felds
2011-07-03 22:31:47 -04:00
parent 99ca078104
commit ac3b0f9f49
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -8,6 +8,11 @@ ________________________________________________________________________________
StepMania 5.0 ????????? | 20110???
--------------------------------------------------------------------------------
2011/07/03
----------
* [ScreenEdit] Fix a crash if one tries to remove an attack that doesn't
exist at that time. [Wolfman2000]
================================================================================
StepMania 5.0 Preview 2 | 20110703
--------------------------------------------------------------------------------
+2 -2
View File
@@ -3126,8 +3126,8 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
if (ScreenMiniMenu::s_iLastRowCode == ScreenEdit::remove )
{
ASSERT(iAttack >= 0);
attacks.erase(attacks.begin() + iAttack);
if (iAttack > 0)
attacks.erase(attacks.begin() + iAttack);
}
else
{