fix this correctly

This commit is contained in:
Glenn Maynard
2005-07-07 20:22:12 +00:00
parent e956001268
commit 4f417bcce2
+8 -2
View File
@@ -245,8 +245,14 @@ void ScreenSelectStyle::UpdateSelectableChoices()
}
}
// Apparently, we can't arbitrarily switch screens at the engine level.
ASSERT_M( iSwitchToStyleIndex != -1, "No Styles are selectable." );
if( iSwitchToStyleIndex == -1 )// no styles are enabled. We're stuck!
{
DEBUG_ASSERT(0);
SCREENMAN->SystemMessage( "No Styles are selectable." );
this->PostScreenMessage( SM_GoToPrevScreen, 0 );
return;
}
m_iSelection = iSwitchToStyleIndex;
AfterChange();