summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-10-17 14:02:36 +0200
committerDavid Tardon <dtardon@redhat.com>2014-10-17 14:06:25 +0200
commit3dcbcd120c2b42e291f6ec65db7b824cf7acd4f7 (patch)
tree12a99750439166f36f25e7ce5ebabd433f1164aa /vcl
parent709ae235a1c7c618cdf3ca9bad6da8e170b0848c (diff)
coverity#735654 avoid division by 0
Change-Id: If368d300c5ed880e1359cbc67df0e13b00fc6ecf
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/combobox.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 857e38926651..df914a5c78c8 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -1114,7 +1114,7 @@ void ComboBox::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines
else
{
Size aOutSz = mpSubEdit->GetOutputSizePixel();
- rnCols = (sal_uInt16)(aOutSz.Width()/nCharWidth);
+ rnCols = (nCharWidth > 0) ? (sal_uInt16)(aOutSz.Width()/nCharWidth) : 1;
rnLines = 1;
}
}