diff options
-rw-r--r-- | sc/source/ui/navipi/content.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index 0ae1b45de7ee..c0e06a0f2b01 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -386,7 +386,7 @@ IMPL_LINK_NOARG(ScContentTree, ContentDoubleClickHdl, weld::TreeView&, bool) pParentWindow->SetCurrentCell( aPos.Col(), aPos.Row() ); // Check whether the comment is currently visible and toggle its visibility ScDocument* pSrcDoc = GetSourceDocument(); - if (ScPostIt* pNote = pSrcDoc->GetNote(aPos.Col(), aPos.Row(), aPos.Tab())) + if (ScPostIt* pNote = pSrcDoc ? pSrcDoc->GetNote(aPos.Col(), aPos.Row(), aPos.Tab()) : nullptr) { bool bVisible = pNote->IsCaptionShown(); // Effectivelly set the visibility of the comment |