Match MxPtrList<LegoNamedPart>::Destroy

This commit is contained in:
Christian Semmler 2024-12-26 12:47:16 -07:00
parent 69969c78ae
commit 9a32b79ea1

View File

@ -12,7 +12,18 @@ class LegoNamedPart {
m_name = p_name;
m_list = p_list;
}
~LegoNamedPart() { delete m_list; }
~LegoNamedPart()
{
LegoLODListCursor cursor(m_list);
LegoLOD* lod;
while (cursor.First(lod)) {
cursor.Detach();
delete lod;
}
delete m_list;
}
const MxString* GetName() const { return &m_name; }
LegoLODList* GetList() { return m_list; }