From a374426f344be0a93c42852474b9614e4dd9dd6d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 20 Sep 2003 18:58:39 +0000 Subject: [PATCH] create image list of the right size to avoid asserts git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23749 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/controls/controls.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/samples/controls/controls.cpp b/samples/controls/controls.cpp index 52f3167fa9..5dc63aca09 100644 --- a/samples/controls/controls.cpp +++ b/samples/controls/controls.cpp @@ -574,9 +574,11 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) }; // fill the image list - wxImageList *imagelist = new wxImageList(32, 32); + wxBitmap bmp(list_xpm); - imagelist-> Add( wxBitmap( list_xpm )); + wxImageList *imagelist = new wxImageList(bmp.GetWidth(), bmp.GetHeight()); + + imagelist-> Add( bmp ); imagelist-> Add( wxBitmap( choice_xpm )); imagelist-> Add( wxBitmap( combo_xpm )); imagelist-> Add( wxBitmap( text_xpm ));