summaryrefslogtreecommitdiff
path: root/svtools/source/control
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/control')
-rw-r--r--svtools/source/control/valueset.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index d1a0409169e8..ebad0fe2f901 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -1819,7 +1819,7 @@ void ValueSet::SelectItem( sal_uInt16 nItemId )
bool bNewLine = false;
// if necessary scroll to the visible area
- if ( mbScroll && nItemId )
+ if (mbScroll && nItemId && mnCols)
{
sal_uInt16 nNewLine = (sal_uInt16)(nItemPos / mnCols);
if ( nNewLine < mnFirstLine )