]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/bmpcboxg.cpp
Factor the brush selection out of OnPaint so it can be overridden in
[wxWidgets.git] / src / generic / bmpcboxg.cpp
index d7af0024032027fc7aebb41d25ba896bb441f0de..e74fabd3c1b95f0cd8f86eef3f919004641ec70a 100644 (file)
@@ -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;