Skip to content

Commit

Permalink
Match MxPtrList<LegoNamedPart>::Destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
foxtacles committed Dec 26, 2024
1 parent 69969c7 commit 9a32b79
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion LEGO1/lego/legoomni/include/legonamedpart.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down

0 comments on commit 9a32b79

Please sign in to comment.