Skip to content

Commit

Permalink
Match MxPtrList<LegoNamedPart>::Destroy (#1285)
Browse files Browse the repository at this point in the history
  • Loading branch information
foxtacles authored Dec 26, 2024
1 parent 2d302dd commit fd5f7ad
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 fd5f7ad

Please sign in to comment.