From bb6d360b066516c7b8c46541750e25a70f494123 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Fri, 20 Jun 2014 06:40:04 -0500 Subject: [PATCH] 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. --- Source/Core/DolphinWX/GameListCtrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/DolphinWX/GameListCtrl.cpp b/Source/Core/DolphinWX/GameListCtrl.cpp index db8880dc83..aaf43639de 100644 --- a/Source/Core/DolphinWX/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/GameListCtrl.cpp @@ -1285,7 +1285,7 @@ void CGameListCtrl::AutomaticColumnWidth() { SetColumnWidth(0, rc.GetWidth()); } - else + else if (GetColumnCount() > 0) { int resizable = rc.GetWidth() - (