a selection screen with no choices is broken; abort early instead of

crashing later (most selection screens assume selection 0 is valid)
This commit is contained in:
Glenn Maynard
2004-04-25 04:31:18 +00:00
parent 18167e013e
commit f2413b4170
+3 -1
View File
@@ -95,8 +95,10 @@ ScreenSelect::ScreenSelect( CString sClassName ) : Screen(sClassName)
}
}
if( !m_aModeChoices.size() )
RageException::Throw( "Screen \"%s\" does not set any choices", m_sName.c_str() );
// devived classes can override if they want
// derived classes can override if they want
LIGHTSMAN->SetLightsMode( LIGHTSMODE_MENU );
}