From: Vadim Zeitlin Date: Sat, 20 Sep 2003 18:58:39 +0000 (+0000) Subject: create image list of the right size to avoid asserts X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a374426f344be0a93c42852474b9614e4dd9dd6d?ds=sidebyside 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 --- 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 ));