From 94037e30f9e6b4d8724002a2a7c2a1a96dc94386 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 18 Jun 2012 11:45:07 +0200 Subject: [PATCH] dmapper: fix crash in ListLevel::SetParaStyle This can be triggered by using a style in the docx document, then manually removing that style from styles.xml. Change-Id: I4aad54d088d9fa56371ff49220316fb14fce6c37 --- writerfilter/source/dmapper/NumberingManager.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index 7691410854fa..5b316d5f9e39 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -136,6 +136,8 @@ void ListLevel::SetValue( Id nId, sal_Int32 nValue ) void ListLevel::SetParaStyle( boost::shared_ptr< StyleSheetEntry > pStyle ) { + if (!pStyle) + return; m_pParaStyle = pStyle; // AFAICT .docx spec does not identify which numberings or paragraph // styles are actually the ones to be used for outlines (chapter numbering),