[Libreoffice-commits] .: Branch 'libreoffice-3-4' - starmath/source
Michael Meeks
michael at kemper.freedesktop.org
Thu May 5 07:04:35 PDT 2011
starmath/source/parse.cxx | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
New commits:
commit 128477a3cba4a8985432ed342ee2d3c654e1e119
Author: Michael Meeks <michael.meeks at novell.com>
Date: Thu May 5 15:00:31 2011 +0100
fix fdo#36863 - math crasher on redraw, introduced by Seek difference
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index ee27781..5d7fc2b 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -2513,11 +2513,15 @@ const SmErrorDesc *SmParser::PrevError()
}
-const SmErrorDesc *SmParser::GetError(size_t i)
+const SmErrorDesc *SmParser::GetError(size_t i)
{
- return ( i < m_aErrDescList.size() )
- ? m_aErrDescList[ i ]
- : m_aErrDescList[ m_nCurError ];
+ if ( i < m_aErrDescList.size() )
+ return m_aErrDescList[ i ];
+
+ if ( (size_t)m_nCurError < m_aErrDescList.size() )
+ return m_aErrDescList[ m_nCurError ];
+
+ return NULL;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list