summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2017-12-07 00:06:36 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-12-07 00:31:17 +0100
commit3809655e6d554dbc6c74b11597c540c4a62d4c09 (patch)
tree86a62b492463ce764e43e485d5e669206681f33a /sc
parentd38674f3b5b6c97be5f8822f52301e29d677ed1e (diff)
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@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/docshell/docfunc.cxx3
1 files changed, 2 insertions, 1 deletions
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;