summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-08-01 21:20:10 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2018-08-02 16:31:08 +0200
commite9c56f20687b9c950977e095476c18ff510fae1e (patch)
tree4d54083826896969f3f5a4a6363a868381e077d4
parent15f845f0d21f3f06c3b4e252a5b8a5e0baffc491 (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 (cherry picked from commit d0a481d09e696f6d5a2a0d40a9d5c48cfca559bf) Reviewed-on: https://gerrit.libreoffice.org/58457 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
-rw-r--r--sw/source/uibase/uiview/pview.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index 7b71101baa8a..d0c2cbbbf0a3 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -1248,8 +1248,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();