]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/object.h
OSX fix
[wxWidgets.git] / include / wx / object.h
index dc7a6a729e4d2aa8b56182d0c314cbba68db009c..7c161ab1135b867e9f64a6bb4e0801980ed16783 100644 (file)
@@ -74,6 +74,27 @@ public:
         , m_next(sm_first)
         { sm_first = this; }
 
+    ~wxClassInfo()
+    {
+        if (sm_first == this)
+        {
+            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;
+            }
+        }
+    }
+
     wxObject *CreateObject() { return m_objectConstructor ? (*m_objectConstructor)() : 0; }
 
     const wxChar       *GetClassName() const { return m_className; }