[Libreoffice-commits] core.git: sc/source

Thorsten Behrens Thorsten.Behrens at CIB.de
Wed Dec 6 23:33:03 UTC 2017


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

New commits:
commit 3809655e6d554dbc6c74b11597c540c4a62d4c09
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>

diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 16b0a61aed51..939c54614d78 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1216,7 +1216,8 @@ bool ScDocFunc::ShowNote( const ScAddress& rPos, bool bShow )
 
     ScTabView::OnLOKNoteStateChanged(pNote);
 
-    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