[Libreoffice-commits] core.git: sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jun 5 11:19:25 UTC 2020
sw/source/uibase/uiview/pview.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit b1e11100f5934548911c07941050e02409020b2c
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jun 5 08:46:02 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jun 5 13:18:47 2020 +0200
rhbz#1844263 unchecked nullptr return from SfxViewFrame::Current()
Change-Id: Id3474f82ef1e52051ccf02d2cfefaf43c8c5ec34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95574
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index fae7d9cefc01..3a499aea528e 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -1153,8 +1153,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 )
More information about the Libreoffice-commits
mailing list