summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lotuswordpro/source/filter/lwptoc.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/lotuswordpro/source/filter/lwptoc.cxx b/lotuswordpro/source/filter/lwptoc.cxx
index ef4af4549ca3..8e802a6463e2 100644
--- a/lotuswordpro/source/filter/lwptoc.cxx
+++ b/lotuswordpro/source/filter/lwptoc.cxx
@@ -353,6 +353,9 @@ sal_Bool LwpTocSuperLayout::GetUsePageNumber(sal_uInt16 index)
*/
sal_uInt16 LwpTocSuperLayout::GetSeparatorType(sal_uInt16 index)
{
+ if (index >= MAX_LEVELS)
+ return NONE;
+
sal_uInt16 Flag = (sal_uInt16)m_nFlags[index];
if (Flag & TS_LEADERDOTS)