summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/view/gridwin2.cxx3
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;