sw/source/uibase/uno/unotxdoc.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 25373581ebe30f6b1b2d850b7f268487afdacb4c
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Fri Oct 21 21:14:04 2022 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Fri Oct 21 22:56:43 2022 +0200

    nullptr check
    
    GetView() returned nullptr in a gtktiledviewer session
    
    Change-Id: I5e16f77d9e6a18e51f548464339fc11d8f733ca1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141582
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sw/source/uibase/uno/unotxdoc.cxx 
b/sw/source/uibase/uno/unotxdoc.cxx
index 6b49898d7c1b..20909bf748f7 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3179,7 +3179,10 @@ void SwXTextDocument::setClientZoom(int 
nTilePixelWidth_, int /*nTilePixelHeight
     // This value is used in postMouseEvent and setGraphicSelection methods
     // for in place chart editing. We assume that x and y scale is roughly
     // the same.
-    SfxInPlaceClient* pIPClient = m_pDocShell->GetView()->GetIPClient();
+    const SwView* pView = m_pDocShell->GetView();
+    if (!pView)
+        return;
+    SfxInPlaceClient* pIPClient = pView->GetIPClient();
     if (!pIPClient)
         return;
 

Reply via email to