summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/docshell/docfunc.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 939c54614d78..430da19d4fa8 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1216,8 +1216,12 @@ bool ScDocFunc::ShowNote( const ScAddress& rPos, bool bShow )
ScTabView::OnLOKNoteStateChanged(pNote);
- if (ScDocShell::GetViewData())
- ScDocShell::GetViewData()->GetScDrawView()->SyncForGrid(pNote->GetCaption());
+ if (ScViewData* pViewData = ScDocShell::GetViewData())
+ {
+ if (ScDrawView* pDrawView = pViewData->GetScDrawView())
+ pDrawView->SyncForGrid( pNote->GetCaption());
+ }
+
rDocShell.SetDocumentModified();
return true;