[Libreoffice-commits] core.git: starmath/source

dante (via logerrit) logerrit at kemper.freedesktop.org
Fri Aug 20 07:36:42 UTC 2021


 starmath/source/mathml/iterator.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit aa232a45bc0d5daf4a0ae4b47b9459000d1ec210
Author:     dante <dante19031999 at gmail.com>
AuthorDate: Fri Aug 20 04:08:37 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Aug 20 09:36:05 2021 +0200

    Add security handlers to the iterators
    
    Change-Id: I0cc8dd92c7ae870e58f0f9118df76569d6deecd8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120764
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/starmath/source/mathml/iterator.cxx b/starmath/source/mathml/iterator.cxx
index 5e88a717f6c1..481ff799689c 100644
--- a/starmath/source/mathml/iterator.cxx
+++ b/starmath/source/mathml/iterator.cxx
@@ -54,11 +54,15 @@ static inline void cloneElement(SmMlElement* aSmMlElement, void* aData)
 
 void SmMlIteratorFree(SmMlElement* pMlElementTree)
 {
+    if (pMlElementTree == nullptr)
+        return;
     SmMlIteratorBottomToTop(pMlElementTree, deleteElement, nullptr);
 }
 
 SmMlElement* SmMlIteratorCopy(SmMlElement* pMlElementTree)
 {
+    if (pMlElementTree == nullptr)
+        return nullptr;
     SmMlElement* aDummyElement = new SmMlElement();
     SmMlIteratorTopToBottom(pMlElementTree, cloneElement, &aDummyElement);
     SmMlElement* aResultElement = aDummyElement->getSubElement(0);


More information about the Libreoffice-commits mailing list