X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/95a4630380511f5e747b1465bf4834e5fac3d515..f239a20092359e3c914adb79bd39f3f5d2b2e06f:/src/xrc/xh_bmpcbox.cpp?ds=inline diff --git a/src/xrc/xh_bmpcbox.cpp b/src/xrc/xh_bmpcbox.cpp index 9c6e5ff894..43936df9dd 100644 --- a/src/xrc/xh_bmpcbox.cpp +++ b/src/xrc/xh_bmpcbox.cpp @@ -3,7 +3,7 @@ // Purpose: XRC resource for wxBitmapComboBox // Author: Jaakko Salli // Created: Sep-10-2006 -// RCS-ID: $Id: +// RCS-ID: $Id$ // Copyright: (c) 2006 Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -21,6 +21,7 @@ #ifndef WX_PRECOMP #include "wx/intl.h" + #include "wx/log.h" #endif #include "wx/bmpcbox.h" @@ -41,9 +42,14 @@ wxObject *wxBitmapComboBoxXmlHandler::DoCreateResource() { 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; }