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??? 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 StepMania 5.0 Preview 2 | 20110703
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
+1 -1
View File
@@ -3126,7 +3126,7 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
if (ScreenMiniMenu::s_iLastRowCode == ScreenEdit::remove ) if (ScreenMiniMenu::s_iLastRowCode == ScreenEdit::remove )
{ {
ASSERT(iAttack >= 0); if (iAttack > 0)
attacks.erase(attacks.begin() + iAttack); attacks.erase(attacks.begin() + iAttack);
} }
else else