diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-06-03 20:03:07 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-06-03 22:44:08 +0200 |
commit | 16b0ad3cf76d9932ebbd169af64b7ad292e68426 (patch) | |
tree | f6c4b984e4f0de0a856a3fbb244be60a0debc44f | |
parent | 6f2b5043613bea755f01b413fd86ece0b3a29e5d (diff) |
cid#1459023 Dereference null return value
Change-Id: I3ff5f121a76a30d07a80b46d469b669010318701
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168388
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-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 |