summaryrefslogtreecommitdiff
path: root/svtools/source/control
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-08-07 15:38:00 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-08-07 18:00:49 +0100
commit086611d2ce95f67a55efbd169ee4636dd60f68c5 (patch)
treef8d1e69ef24c9f5cbc0bf77badc66bf1948c04c0 /svtools/source/control
parent9823f73137bdbd7e890aff61e4bc34df384029e8 (diff)
coverity#1202783 Division or modulo by zero
Change-Id: I17892b9daa3be450001ac88239008d0d27f4a01f
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 )