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

Takeshi Abe tabe at fixedpoint.jp
Mon Feb 15 13:23:54 UTC 2016


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

New commits:
commit 393c1a62f2516c1f8265c05f71e5959f8cd89194
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Mon Feb 15 17:27:02 2016 +0900

    starmath: Replace OSL_ENSURE with assert
    
    These pointers must be non-null, or deferencing null can happen.
    
    Change-Id: I3ced1204abb70cf7c525ea9d50c6a3a295728ab5
    Reviewed-on: https://gerrit.libreoffice.org/22365
    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 2ee43f9..296887b 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -840,8 +840,8 @@ void SmUnHorNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
 
     SmNode *pOper = GetSubNode(bIsPostfix ? 1 : 0),
            *pBody = GetSubNode(bIsPostfix ? 0 : 1);
-    OSL_ENSURE(pOper, "Sm: NULL pointer");
-    OSL_ENSURE(pBody, "Sm: NULL pointer");
+    assert(pOper);
+    assert(pBody);
 
     pOper->SetSize(Fraction (rFormat.GetRelSize(SIZ_OPERATOR), 100));
     pOper->Arrange(rDev, rFormat);
@@ -2524,7 +2524,7 @@ void SmMatrixNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
     {   aLineRect = SmRect();
         for (j = 0;  j < nNumCols;  j++)
         {   SmNode *pTmpNode = GetSubNode(i * nNumCols + j);
-            OSL_ENSURE(pTmpNode, "Sm: NULL pointer");
+            assert(pTmpNode);
 
             const SmRect &rNodeRect = pTmpNode->GetRect();
 


More information about the Libreoffice-commits mailing list