sc/source/core/data/document.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit 1fd89488d282cad8386af12064876f8ba0ac2956 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Thu Feb 8 11:53:43 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Thu Feb 8 22:15:19 2024 +0100 calc null-deref probably seen after a sheet was deleted /lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f259a642520] /opt/collaboraoffice/program/../program/libsclo.so(+0x5b3db8)[0x7f25873b3db8] /opt/collaboraoffice/program/../program/libsclo.so(+0x4964a1)[0x7f25872964a1] this looks most likely: 00000000005b3db0 ScTable::ContainsNotesInRange(ScRange const&) const 0000000000496440 ScDocument::ContainsNotesInRange(ScRangeList const&) const Change-Id: Ib019fe8abc18538eee7096e1fe5589e83e4849da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163136 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 0fcba88870a1..7ad5a3e2ae89 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -6866,6 +6866,8 @@ void ScDocument::GetNotesInRange( const ScRangeList& rRangeList, std::vector<sc: const ScRange & rRange = rRangeList[i]; for( SCTAB nTab = rRange.aStart.Tab(); nTab <= rRange.aEnd.Tab(); ++nTab ) { + if (!maTabs[nTab]) + continue; maTabs[nTab]->GetNotesInRange( rRange, rNotes ); } } @@ -6884,6 +6886,8 @@ bool ScDocument::ContainsNotesInRange( const ScRangeList& rRangeList ) const const ScRange & rRange = rRangeList[i]; for( SCTAB nTab = rRange.aStart.Tab(); nTab <= rRange.aEnd.Tab(); ++nTab ) { + if (!maTabs[nTab]) + continue; bool bContainsNote = maTabs[nTab]->ContainsNotesInRange( rRange ); if(bContainsNote) return true;