X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a6391d30221084cbd7146f8076141b697891b9d4..10769d8c47c21fe0ec5034726791a5ad4cf19475:/include/wx/object.h?ds=sidebyside diff --git a/include/wx/object.h b/include/wx/object.h index 6f5c68ce87..7c161ab113 100644 --- a/include/wx/object.h +++ b/include/wx/object.h @@ -72,16 +72,28 @@ public: , m_baseInfo1(0) , m_baseInfo2(0) , m_next(sm_first) + { sm_first = this; } + + ~wxClassInfo() + { + if (sm_first == this) { -#ifdef __WXDEBUG__ - if (sm_classTable != NULL) { - wxString msg(_T("too late binding of class info (lazy binding) for ")); - msg += className; - wxFAIL_MSG(msg); + sm_first = m_next; + } + else + { + wxClassInfo * info = sm_first; + while (info) + { + if (info->m_next == this) + { + info->m_next = m_next; + break; + } + info = info->m_next; } -#endif - sm_first = this; } + } wxObject *CreateObject() { return m_objectConstructor ? (*m_objectConstructor)() : 0; }