diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.cpp b/Source/Core/DolphinWX/Src/GameListCtrl.cpp index b99f269142..2e86f28a60 100644 --- a/Source/Core/DolphinWX/Src/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/Src/GameListCtrl.cpp @@ -74,6 +74,11 @@ CGameListCtrl::CGameListCtrl(wxWindow* parent, const wxWindowID id, const wxPoin InitBitmaps(); } +CGameListCtrl::~CGameListCtrl() +{ + delete m_imageListSmall; +} + void CGameListCtrl::InitBitmaps() { m_imageListSmall = new wxImageList(96, 32); @@ -301,7 +306,7 @@ wxColour blend50(const wxColour& c1, const wxColour& c2) void CGameListCtrl::SetBackgroundColor() { - for(long i = 0; i <= GetItemCount(); i++) + for(long i = 0; i < GetItemCount(); i++) { #ifdef _WIN32 wxColour color = (i & 1) ? blend50(GetSysColor(COLOR_3DLIGHT), GetSysColor(COLOR_WINDOW)) : GetSysColor(COLOR_WINDOW); diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.h b/Source/Core/DolphinWX/Src/GameListCtrl.h index e8710e8a27..87cd291d9c 100644 --- a/Source/Core/DolphinWX/Src/GameListCtrl.h +++ b/Source/Core/DolphinWX/Src/GameListCtrl.h @@ -29,6 +29,8 @@ class CGameListCtrl : public wxListCtrl public: CGameListCtrl(wxWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style); + ~CGameListCtrl(); + void Update(); void BrowseForDirectory(); const CISOFile *GetSelectedISO() const;