summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 4b02af2c5ded..31650d253f7f 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -629,8 +629,11 @@ void SwXTextDocument::dispose()
void SwXTextDocument::close( sal_Bool bDeliverOwnership )
{
- uno::Sequence< uno::Any > aArgs;
- pDocShell->CallAutomationDocumentEventSinks( "Close", aArgs );
+ if(pDocShell)
+ {
+ uno::Sequence< uno::Any > aArgs;
+ pDocShell->CallAutomationDocumentEventSinks( "Close", aArgs );
+ }
SolarMutexGuard aGuard;
if(IsValid() && m_pHiddenViewFrame)
lcl_DisposeView( m_pHiddenViewFrame, pDocShell);