Kaydet (Commit) 393c1a62 authored tarafından Takeshi Abe's avatar Takeshi Abe Kaydeden (comit) Michael Stahl

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/22365Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst bb3761df
...@@ -840,8 +840,8 @@ void SmUnHorNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) ...@@ -840,8 +840,8 @@ void SmUnHorNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
SmNode *pOper = GetSubNode(bIsPostfix ? 1 : 0), SmNode *pOper = GetSubNode(bIsPostfix ? 1 : 0),
*pBody = GetSubNode(bIsPostfix ? 0 : 1); *pBody = GetSubNode(bIsPostfix ? 0 : 1);
OSL_ENSURE(pOper, "Sm: NULL pointer"); assert(pOper);
OSL_ENSURE(pBody, "Sm: NULL pointer"); assert(pBody);
pOper->SetSize(Fraction (rFormat.GetRelSize(SIZ_OPERATOR), 100)); pOper->SetSize(Fraction (rFormat.GetRelSize(SIZ_OPERATOR), 100));
pOper->Arrange(rDev, rFormat); pOper->Arrange(rDev, rFormat);
...@@ -2524,7 +2524,7 @@ void SmMatrixNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) ...@@ -2524,7 +2524,7 @@ void SmMatrixNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
{ aLineRect = SmRect(); { aLineRect = SmRect();
for (j = 0; j < nNumCols; j++) for (j = 0; j < nNumCols; j++)
{ SmNode *pTmpNode = GetSubNode(i * nNumCols + j); { SmNode *pTmpNode = GetSubNode(i * nNumCols + j);
OSL_ENSURE(pTmpNode, "Sm: NULL pointer"); assert(pTmpNode);
const SmRect &rNodeRect = pTmpNode->GetRect(); const SmRect &rNodeRect = pTmpNode->GetRect();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment