Fix memory leak in conversion from wxAny to wxVariant

Dynamically allocated copies in intermediate wxVariantList need to be deleted
This commit is contained in:
Paul Cornett
2019-10-30 08:34:47 -07:00
parent acf2f9ef1f
commit 25d25a4385

View File

@@ -1982,6 +1982,7 @@ wxVariantData* wxVariantDataList::VariantDataFactory(const wxAny& any)
{
wxAnyList src = any.As<wxAnyList>();
wxVariantList dst;
dst.DeleteContents(true);
wxAnyList::compatibility_iterator node = src.GetFirst();
while (node)
{