diff options
author | Tor Lillqvist <tml@collabora.com> | 2018-05-15 22:14:40 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2018-05-31 15:29:43 +0300 |
commit | 8a2f30e548f930f0ddd869e07f58947616ba9ea4 (patch) | |
tree | d7436aade08541c26f9dcadc6fed29093145988d | |
parent | a03d44076f74d73398d632cee5358bfc3103dd01 (diff) |
Avoid crash if pDocShell is null
Change-Id: I4d43bdd6789bdf01cd9b7b38377b19294a544477
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 7 |
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); |