[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sat Jun 6 14:25:39 UTC 2020


 sw/source/uibase/uiview/pview.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 9518b5ebaf550525d30771ede57a1ebc24d9125a
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: 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 <caolanm at 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 )


More information about the Libreoffice-commits mailing list