[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - sc/source

Thorsten Behrens Thorsten.Behrens at CIB.de
Wed Dec 6 23:34:40 UTC 2017


 sc/source/ui/docshell/docfunc.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 00b9d1f11baa4323c406bffbdb61a5b641d779fe
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Date:   Thu Dec 7 00:06:36 2017 +0100

    sc: don't crash on loading comments
    
    Seems filters call ShowNote before a view is set or something.
    Fixup for 25555c50ad2a57c1b2313f39b8132ac5e80a45fd.
    
    Change-Id: I9a69bf28b17cb16df7f1b1d06d9d3168da4a34b5
    Reviewed-on: https://gerrit.libreoffice.org/46000
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit 3809655e6d554dbc6c74b11597c540c4a62d4c09)
    Reviewed-on: https://gerrit.libreoffice.org/46003

diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 4065a8ddb2cf..a00ec537c14b 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1226,7 +1226,8 @@ bool ScDocFunc::ShowNote( const ScAddress& rPos, bool bShow )
     if (rDoc.IsStreamValid(rPos.Tab()))
         rDoc.SetStreamValid(rPos.Tab(), false);
 
-    ScDocShell::GetViewData()->GetScDrawView()->SyncForGrid(pNote->GetCaption());
+    if (ScDocShell::GetViewData())
+        ScDocShell::GetViewData()->GetScDrawView()->SyncForGrid(pNote->GetCaption());
     rDocShell.SetDocumentModified();
 
     return true;


More information about the Libreoffice-commits mailing list