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

Takeshi Abe tabe at fixedpoint.jp
Thu Apr 7 20:52:27 UTC 2016


 starmath/source/node.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 6f1df6dca04579dea5e54113cc9c0003ee98ebfe
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Tue Mar 29 16:48:51 2016 +0900

    starmath: Assert that SmAlignNode must have only one child
    
    Change-Id: Ia59e453040b121c27a1326ee4bdc8a7ccaa4074d
    Reviewed-on: https://gerrit.libreoffice.org/23588
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index f7dec45..b0cecfa 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -1725,9 +1725,10 @@ void SmOperNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
 void SmAlignNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
     // set alignment within the entire subtree (including current node)
 {
-    OSL_ENSURE(GetNumSubNodes() > 0, "Sm: missing subnode");
+    assert(GetNumSubNodes() == 1);
 
     SmNode  *pNode = GetSubNode(0);
+    assert(pNode);
 
     RectHorAlign  eHorAlign = RectHorAlign::Center;
     switch (GetToken().eType)


More information about the Libreoffice-commits mailing list