summaryrefslogtreecommitdiff
path: root/starmath/source
diff options
context:
space:
mode:
Diffstat (limited to 'starmath/source')
-rw-r--r--starmath/source/mathtype.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index 66b4dfd60f84..9273a4498b61 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -3191,8 +3191,9 @@ void MathType::HandleAttributes(SmNode *pNode,int nLevel)
break;
case TOVERLINE: //If the next node is not text
//or text with more than one char
- if ((pIsText->GetToken().eType != TTEXT) ||
- (pIsText->GetText().getLength() > 1))
+ if (!pIsText ||
+ pIsText->GetToken().eType != TTEXT ||
+ pIsText->GetText().getLength() > 1)
nOldPending = StartTemplate(0x11);
break;
default:
@@ -3213,8 +3214,9 @@ void MathType::HandleAttributes(SmNode *pNode,int nLevel)
EndTemplate(nOldPending);
break;
case TOVERLINE:
- if ((pIsText->GetToken().eType != TTEXT) ||
- (pIsText->GetText().getLength() > 1))
+ if (!pIsText ||
+ pIsText->GetToken().eType != TTEXT ||
+ pIsText->GetText().getLength() > 1)
EndTemplate(nOldPending);
break;
default:
@@ -3261,8 +3263,9 @@ void MathType::HandleAttributes(SmNode *pNode,int nLevel)
pS->WriteUChar( 16 );
break;
case TOVERLINE:
- if ((pIsText->GetToken().eType == TTEXT) &&
- (pIsText->GetText().getLength() == 1))
+ if (pIsText &&
+ (pIsText->GetToken().eType == TTEXT &&
+ pIsText->GetText().getLength() == 1))
pS->WriteUChar( 17 );
break;
case TBREVE: