diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-05-10 21:33:03 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-05-11 11:05:58 +0200 |
commit | 7d6d1dee81470133df652bdbdb3b6a93e46da97c (patch) | |
tree | e78a4a3f57d6e65ed2b975ba51c44240438f736f /sc | |
parent | d309298d1f70f4ffbf699b1aa1b2bfe08be8c4ef (diff) |
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 <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/column3.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
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()) { |