summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2011-12-07 00:25:13 +0100
committerStephan Bergmann <sbergman@redhat.com>2011-12-07 00:25:55 +0100
commitb419bb21a76c48dda9f9a6ef6182b98e03358176 (patch)
tree06984cfe88e3345ba6390a39c49e433bc91a1854 /starmath
parent7c5a11df60e5d8707e03e61f586fcf9defe6b597 (diff)
Looks like the old stack implementation returned 0 on empty stack Pop().
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/parse.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 232be481d4d9..7a2741f1f365 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -1115,10 +1115,10 @@ void SmParser::Line()
void SmParser::Expression()
{
bool bUseExtraSpaces = true;
- SmNode *pNode = m_aNodeStack.top();
- m_aNodeStack.pop();
- if (pNode)
+ if (!m_aNodeStack.empty())
{
+ SmNode *pNode = m_aNodeStack.top();
+ m_aNodeStack.pop();
if (pNode->GetToken().eType == TNOSPACE)
bUseExtraSpaces = false;
else