diff --git a/LEGO1/mxlist.h b/LEGO1/mxlist.h index 112780b6..9ace7bf7 100644 --- a/LEGO1/mxlist.h +++ b/LEGO1/mxlist.h @@ -30,6 +30,8 @@ class MxListParent : public MxCore m_count = 0; m_customDestructor = Destroy; } + // OFFSET: LEGO1 0x1001cdd0 + virtual ~MxListParent() {} // OFFSET: LEGO1 0x1001cd30 static void Destroy(T *) {}; @@ -60,12 +62,13 @@ class MxList : protected MxListParent }; template -// OFFSET: LEGO1 0x1001cfe0 +// OFFSET: LEGO1 0x1001ce20 MxList::~MxList() { - MxListEntry *t = m_first; + for (MxListEntry *t = m_first;;) { + if (!t) + break; - while (t) { MxListEntry *next = t->m_next; m_customDestructor(t->m_obj); delete t;