fix crash if 0 rows

This commit is contained in:
Chris Danford
2005-12-04 09:00:33 +00:00
parent 16b4785a07
commit cf5e658c00
+1 -1
View File
@@ -661,7 +661,7 @@ void ScreenOptions::PositionRows()
vector<OptionRow*> Rows( m_pRows );
OptionRow *ExitRow = NULL;
if( (bool)SEPARATE_EXIT_ROW && Rows.back()->GetRowType() == OptionRow::ROW_EXIT )
if( (bool)SEPARATE_EXIT_ROW && !Rows.empty() && Rows.back()->GetRowType() == OptionRow::ROW_EXIT )
{
ExitRow = &*Rows.back();