diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-05-01 20:58:00 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-05-02 10:01:47 +0200 |
commit | 7e74f2260b7d093c1b3bb6e362de1c52b5068cc6 (patch) | |
tree | 2ff6ad8c1a89d4e0d321af71acd2660dabe0415d | |
parent | 24f938c016b62aa8f05e23e2be4f51e7ead51e65 (diff) |
cid#1528432 Argument cannot be negative
Change-Id: Ic55c524a9ec8ae9a4df7f96d284d822616fa3b54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151241
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sc/source/ui/view/gridwin2.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index 94d90443da26..01f5f39dd7d3 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -746,6 +746,9 @@ void ScGridWindow::UpdateDPPopupMenuForFieldChange() return; tools::Long nIndex = mpDPFieldPopup->getField(); + if (nIndex < 0) + return; + tools::Long nDimIndex = pDPData->maFieldIndices[nIndex]; if (nDimIndex == pDPData->mnDim) return; |