# HG changeset patch
# User Michael Stahl <mst@openoffice.org>
# Date 1303140562 0
# Node ID 0e216ed13561ca17180661ab6ff06c44a79a2a70
# Parent  b2dddb8a0155ccfce5eb3db211076c3cfa5dbc4a
rtftok01: writerfilter: domainmapper: check pParaContext

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -649,7 +649,8 @@
               old _and_ new DropCap must not occur
              */
 
-            bool bIsDropCap = pParaContext->IsFrameMode() && sal::static_int_cast<Id>(pParaContext->GetDropCap()) != NS_ooxml::LN_Value_wordprocessingml_ST_DropCap_none;
+            bool bIsDropCap = pParaContext && pParaContext->IsFrameMode() &&
+                sal::static_int_cast<Id>(pParaContext->GetDropCap()) != NS_ooxml::LN_Value_wordprocessingml_ST_DropCap_none;
             style::DropCapFormat aDrop;
             ParagraphPropertiesPtr pToBeSavedProperties;
             bool bKeepLastParagraphProperties = false;
@@ -812,7 +813,7 @@
             {
                 // (1) doesn't need handling
                 //
-                if( !bIsDropCap && pParaContext->IsFrameMode() )
+                if (!bIsDropCap && pParaContext && pParaContext->IsFrameMode())
                 {
                     pToBeSavedProperties.reset( new ParagraphProperties(*pParaContext) );
                     lcl_AddRangeAndStyle(pToBeSavedProperties, xTextAppend, pPropertyMap);
