diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-08-01 21:20:10 +0200 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2018-08-01 23:45:30 +0200 |
commit | d0a481d09e696f6d5a2a0d40a9d5c48cfca559bf (patch) | |
tree | f096f394aa5c379ad15ec41acace68c0e47657b5 /sw/source/uibase | |
parent | 89fd0dff73e2442dfabcdbef6a5ad8a6c28772d6 (diff) |
tdf#119042: Also check if SfxViewFrame::Current() is nullptr
Change-Id: I5ac43ff626bfb4e2e754cacead5bf87115f3ce4b
Reviewed-on: https://gerrit.libreoffice.org/58447
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/uiview/pview.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index d43a0460fd48..14fd822e1bf4 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -1231,8 +1231,9 @@ SwPagePreview::~SwPagePreview() delete pVShell; m_pViewWin.disposeAndClear(); - if (auto& pBar = SfxViewFrame::Current()->GetWindow().GetSystemWindow()->GetNotebookBar()) - pBar->ControlListener(false); + if (SfxViewFrame* pCurrent = SfxViewFrame::Current()) + if (auto& pBar = pCurrent->GetWindow().GetSystemWindow()->GetNotebookBar()) + pBar->ControlListener(false); m_pScrollFill.disposeAndClear(); m_pHScrollbar.disposeAndClear(); m_pVScrollbar.disposeAndClear(); |