[Libreoffice-commits] .: starmath/source

Stephan Bergmann sbergmann at kemper.freedesktop.org
Tue Dec 6 15:26:24 PST 2011


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

New commits:
commit b419bb21a76c48dda9f9a6ef6182b98e03358176
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Dec 7 00:25:13 2011 +0100

    Looks like the old stack implementation returned 0 on empty stack Pop().

diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 232be48..7a2741f 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


More information about the Libreoffice-commits mailing list