diff options
author | Michael Meeks <michael.meeks@novell.com> | 2011-05-05 15:00:31 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2011-05-05 15:00:31 +0100 |
commit | 8c26bbeb392fe12e38e75bccc23c0e6ddae021b5 (patch) | |
tree | aa93b848d0efb1ea3286162a9ac8d6b77e0ae825 /starmath | |
parent | a48da70b78a1519e27700fc523f7fe13225228d8 (diff) |
fix fdo#36863 - math crasher on redraw, introduced by Seek difference
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/parse.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index ea015a242661..1aa56358693d 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: */ |