diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-05-05 20:53:49 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-05-06 12:23:39 +0200 |
commit | 0cd07e1fb7afc0a6831eaafabcead7e0c5f7ac3b (patch) | |
tree | 8f145203ea1b9cf43d5e41b0c99c12b3e7465575 /sc/source/ui/vba/vbarange.cxx | |
parent | ef2066cdfe86019a3099b3530fb091ca2a4d2446 (diff) |
WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: I71d20c4d35b5123216da55a8b314400c93cae6fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167173
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sc/source/ui/vba/vbarange.cxx')
-rw-r--r-- | sc/source/ui/vba/vbarange.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 026c0ec5f260..6fc19a9497b9 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -4633,6 +4633,7 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const // e.g. can you have an Operator without a Criteria? In LibreOffice it if ( Operator.hasValue() && ( Operator >>= nOperator ) ) { + assert(pTabFilts); // if it's a bottom/top Ten(Percent/Value) and there // is no value specified for criteria1 set it to 10 if ( !bCritHasNumericValue && sCriteria1.isEmpty() && ( nOperator != excel::XlAutoFilterOperator::xlOr ) && ( nOperator != excel::XlAutoFilterOperator::xlAnd ) ) @@ -4669,6 +4670,7 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const } if ( !bAll && bAcceptCriteria2 ) { + assert(pTabFilts); pTabFilts[0].Connection = sheet::FilterConnection_AND; pTabFilts[0].Field = (nField - 1); |