summaryrefslogtreecommitdiff
path: root/starmath/source/mathml/iterator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'starmath/source/mathml/iterator.cxx')
-rw-r--r--starmath/source/mathml/iterator.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/starmath/source/mathml/iterator.cxx b/starmath/source/mathml/iterator.cxx
index 481ff799689c..489cbe8ebc05 100644
--- a/starmath/source/mathml/iterator.cxx
+++ b/starmath/source/mathml/iterator.cxx
@@ -56,7 +56,11 @@ void SmMlIteratorFree(SmMlElement* pMlElementTree)
{
if (pMlElementTree == nullptr)
return;
- SmMlIteratorBottomToTop(pMlElementTree, deleteElement, nullptr);
+ for (size_t i = 0; i < pMlElementTree->getSubElementsCount(); ++i)
+ {
+ SmMlIteratorFree(pMlElementTree->getSubElement(i));
+ }
+ deleteElement(pMlElementTree, nullptr);
}
SmMlElement* SmMlIteratorCopy(SmMlElement* pMlElementTree)