Ensure (Get|Set)ColumnWidth is not called on a non existant column.

The AutomaticColumnWidth method can be called when the game list does
not have any columns (for example when dolphin is starting).  In this
case wxWidgets assertions fail when (Get|Set)ColumnWidth are called on
columns that do not exist.  So check to make sure there are columns to
prevent this.
This commit is contained in:
Glenn Rice 2014-06-20 06:40:04 -05:00
parent 0e0238eccf
commit bb6d360b06
1 changed files with 1 additions and 1 deletions

View File

@ -1285,7 +1285,7 @@ void CGameListCtrl::AutomaticColumnWidth()
{
SetColumnWidth(0, rc.GetWidth());
}
else
else if (GetColumnCount() > 0)
{
int resizable = rc.GetWidth() - (