]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_bmpcbox.cpp
do not add files in wxDebugReport::AddFile if copy failed
[wxWidgets.git] / src / xrc / xh_bmpcbox.cpp
index 6fc2840bd676c594eb7b44ebd60470afa450ee02..43936df9dd8e66eb3dae870e46d1e32041fe1b0a 100644 (file)
@@ -21,6 +21,7 @@
 
 #ifndef WX_PRECOMP
     #include "wx/intl.h"
 
 #ifndef WX_PRECOMP
     #include "wx/intl.h"
+    #include "wx/log.h"
 #endif
 
 #include "wx/bmpcbox.h"
 #endif
 
 #include "wx/bmpcbox.h"
@@ -41,9 +42,14 @@ wxObject *wxBitmapComboBoxXmlHandler::DoCreateResource()
 {
     if (m_class == wxT("ownerdrawnitem"))
     {
 {
     if (m_class == wxT("ownerdrawnitem"))
     {
-        wxCHECK_MSG(m_combobox, NULL, wxT("Incorrect syntax of XRC resource: ownerdrawnitem not within a bitmapcombobox!"));
+        if ( !m_combobox )
+        {
+            ReportError("ownerdrawnitem only allowed within a wxBitmapComboBox");
+            return NULL;
+        }
 
 
-        m_combobox->Append(GetText(wxT("text")), GetBitmap(wxT("bitmap"), wxART_MISSING_IMAGE));
+        m_combobox->Append(GetText(wxT("text")),
+                           GetBitmap(wxT("bitmap")));
 
         return m_combobox;
     }
 
         return m_combobox;
     }