[Libreoffice-commits] .: Branch 'libreoffice-3-5' - starmath/source

Stephan Bergmann sbergmann at kemper.freedesktop.org
Tue Dec 6 23:39:17 PST 2011


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

New commits:
commit 529913a78d37adf32c672865bb7939f7e8c109f5
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