X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/012967ef1b0789a537452e36cdd7cafc5fdb51b7..001ad728a48bcfc7a763027b41f10ba1a25ce276:/src/generic/bmpcboxg.cpp?ds=sidebyside diff --git a/src/generic/bmpcboxg.cpp b/src/generic/bmpcboxg.cpp index d7af002403..3432680bd6 100644 --- a/src/generic/bmpcboxg.cpp +++ b/src/generic/bmpcboxg.cpp @@ -4,7 +4,7 @@ // Author: Jaakko Salli // Modified by: // Created: Aug-31-2006 -// RCS-ID: $Id: +// RCS-ID: $Id$ // Copyright: (c) 2005 Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -264,6 +264,8 @@ int wxBitmapComboBox::DoInsertWithImage(const wxString& item, const wxBitmap& image, unsigned int pos) { + wxCHECK_MSG( IsValidInsert(pos), wxNOT_FOUND, wxT("invalid item index") ); + if ( !DoInsertBitmap(image, pos) ) return wxNOT_FOUND; @@ -317,7 +319,7 @@ void wxBitmapComboBox::DetermineIndent() if ( m_usedImgSize.x > 0 ) { - indent = m_usedImgSize.y + IMAGE_SPACING_LEFT + IMAGE_SPACING_RIGHT; + indent = m_usedImgSize.x + IMAGE_SPACING_LEFT + IMAGE_SPACING_RIGHT; m_imgAreaWidth = indent; indent -= 3;