summaryrefslogtreecommitdiff
path: root/sc/source/ui/dbgui/tpsort.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/dbgui/tpsort.cxx')
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index c9c770734be6..38724dd4b3ed 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -164,7 +164,7 @@ void ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ )
{
for ( sal_uInt16 i=0; i<nSortKeyCount; i++ )
{
- if ( aSortData.maKeyState[i].bDoSort )
+ if ( i < aSortData.maKeyState.size() && aSortData.maKeyState[i].bDoSort )
{
maSortKeyItems[i].aLbSort.SelectEntryPos( GetFieldSelPos(
aSortData.maKeyState[i].nField ) );