sc/source/core/data/column3.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
New commits: commit 7d6d1dee81470133df652bdbdb3b6a93e46da97c Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed May 10 21:33:03 2023 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu May 11 11:05:58 2023 +0200 cid#1529968 Dereference null return value Change-Id: Ib1d3f6229bf884b27b8e697b824e99ffa0af800a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151648 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 0c834b85bb40..9c035b3b44d0 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -2575,9 +2575,11 @@ class FilterEntriesHandler // Colors ScAddress aPos(rColumn.GetCol(), nRow, rColumn.GetTab()); - ScTable* pTable = rColumn.GetDoc().FetchTable(rColumn.GetTab()); - mrFilterEntries.addTextColor(pTable->GetCellTextColor(aPos)); - mrFilterEntries.addBackgroundColor(pTable->GetCellBackgroundColor(aPos)); + if (ScTable* pTable = rColumn.GetDoc().FetchTable(rColumn.GetTab())) + { + mrFilterEntries.addTextColor(pTable->GetCellTextColor(aPos)); + mrFilterEntries.addBackgroundColor(pTable->GetCellBackgroundColor(aPos)); + } if (rCell.hasString()) {