summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2011-08-01 19:55:42 +0200
committerMiklos Vajna <vmiklos@frugalware.org>2011-08-02 23:33:58 +0200
commit88091ae83ef1bb2e710bbb76efa351cc92276857 (patch)
treed9c79aae4a19a7323fc5071d3dd482574f84f75e
parent8866590209375e5666dc7a2d8621def531f5cdf9 (diff)
MSWordExportBase::ExportDocument: check if we have a DocShell
This fixes a crash during RTF export invoked by copy&paste, as the called constructor would unconditionally dereference the DocShell's pointer since commit 183c9723dce0296baa0a38220199a1aa0e9f52ca.
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index edad4b155c..cf07bc8217 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2925,7 +2925,7 @@ void MSWordExportBase::ExportDocument( bool bWriteAll )
if ( !pOleMap)
pOleMap = new WW8OleMaps;
- if ( !pOCXExp )
+ if ( !pOCXExp && pDoc->GetDocShell() )
pOCXExp = new SwMSConvertControls( pDoc->GetDocShell(), pCurPam );
// #i81405# - Collect anchored objects before changing the redline mode.