sw/source/uibase/uiview/pview.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit 9518b5ebaf550525d30771ede57a1ebc24d9125a Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Jun 5 08:46:02 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sat Jun 6 16:25:06 2020 +0200 rhbz#1844263 unchecked nullptr return from SfxViewFrame::Current() Change-Id: Id3474f82ef1e52051ccf02d2cfefaf43c8c5ec34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95554 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 3e93705806f3..c8a3c398b46b 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -1159,8 +1159,9 @@ SwPagePreview::SwPagePreview(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh): SfxShell::SetContextName(vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Printpreview)); SfxShell::BroadcastContextForActivation(true); //removelisteners for notebookbar - if (auto& pBar = SfxViewFrame::Current()->GetWindow().GetSystemWindow()->GetNotebookBar()) - pBar->ControlListenerForCurrentController(false); + if (SfxViewFrame* pCurrent = SfxViewFrame::Current()) + if (auto& pBar = pCurrent->GetWindow().GetSystemWindow()->GetNotebookBar()) + pBar->ControlListenerForCurrentController(false); SfxObjectShell* pObjShell = pViewFrame->GetObjectShell(); if ( !pOldSh ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits