wxXMetaFile::~wxXMetaFile(void)
{
- wxNode *node = metaRecords.GetFirst();
+ wxObjectList::compatibility_iterator node = metaRecords.GetFirst();
while (node)
{
wxMetaRecord *rec = (wxMetaRecord *)node->GetData();
delete rec;
- wxNode *next = node->GetNext();
- delete node;
+ wxObjectList::compatibility_iterator next = node->GetNext();
+ metaRecords.Erase(node);
node = next;
}
}
bool wxXMetaFile::Play(wxDC *dc)
{
- wxNode *node = metaRecords.GetFirst();
+ wxObjectList::compatibility_iterator node = metaRecords.GetFirst();
while (node)
{
wxMetaRecord *rec = (wxMetaRecord *)node->GetData();