]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/object.h
Lots of updates for color dialog and sliders
[wxWidgets.git] / include / wx / object.h
index 6f5c68ce8723df78dfb64ee013ea038a26532c4c..7c161ab1135b867e9f64a6bb4e0801980ed16783 100644 (file)
@@ -72,16 +72,28 @@ public:
         , m_baseInfo1(0)
         , m_baseInfo2(0)
         , m_next(sm_first)
         , 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; }
 
 
     wxObject *CreateObject() { return m_objectConstructor ? (*m_objectConstructor)() : 0; }