From 48bf40919c9d4701adbd6321baa57eea65113b41 Mon Sep 17 00:00:00 2001 From: ElenaSubbotina Date: Fri, 17 Nov 2017 19:33:38 +0300 Subject: [PATCH] fix... --- ASCOfficeDocFile/DocDocxConverter/NumberingMapping.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ASCOfficeDocFile/DocDocxConverter/NumberingMapping.cpp b/ASCOfficeDocFile/DocDocxConverter/NumberingMapping.cpp index e8d2a9dbe8..aa90ee8f4e 100644 --- a/ASCOfficeDocFile/DocDocxConverter/NumberingMapping.cpp +++ b/ASCOfficeDocFile/DocDocxConverter/NumberingMapping.cpp @@ -582,7 +582,7 @@ namespace DocFileFormat // The style id is used for a reverse reference. // It can happen that the reference points to the wrong style. - if (styleIndex != ListData::ISTD_NIL) + if (styleIndex != ListData::ISTD_NIL && styleIndex < m_document->Styles->Styles->size()) { m_pXmlWriter->WriteNodeBegin( L"w:pStyle", TRUE ); m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::XmlEncode(StyleSheetMapping::MakeStyleId(m_document->Styles->Styles->at(styleIndex))));