summaryrefslogtreecommitdiff
path: root/starmath/source
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-05-31 10:45:59 +0200
committerJan Holesovsky <kendy@suse.cz>2011-05-31 10:45:59 +0200
commit31d2ec14ca3790748cf0c724f14f494cce7dff4f (patch)
tree074e3fcfbb3609f15c6f3dbb82f98d2bf35839df /starmath/source
parent6803462fb620eb350923148a2c10c3223266e97f (diff)
parentc8deddfb2e3aa3d00c2b3321e41de79b526b7c2f (diff)
Merge commit 'libreoffice-3.4.0.2'
Conflicts: sw/inc/viewsh.hxx sw/source/core/layout/paintfrm.cxx sw/source/ui/index/cnttab.cxx sw/source/ui/ribbar/inputwin.cxx
Diffstat (limited to 'starmath/source')
-rw-r--r--starmath/source/parse.cxx12
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: */