diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-11-01 20:34:31 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-11-01 21:02:14 +0000 |
commit | 169bc7c6c608215cf3805b84d617892c8bf487f4 (patch) | |
tree | c2c824be17c465d4019d1545c728424c871e2b43 /vcl/source/control | |
parent | 454b5d5a6d795b6b8bf5570c1cef030587e58277 (diff) |
coverity#735654 Division or modulo by zero
Change-Id: I9ab09d65ba7587230de320e22a79e9c7224f4ade
Diffstat (limited to 'vcl/source/control')
-rw-r--r-- | vcl/source/control/combobox.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index b69e9fd5c8a9..329e48a1237b 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -1108,7 +1108,7 @@ void ComboBox::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines if ( !IsDropDownBox() ) { Size aOutSz = mpImplLB->GetMainWindow().GetOutputSizePixel(); - rnCols = (sal_uInt16)(aOutSz.Width()/nCharWidth); + rnCols = (nCharWidth > 0) ? (sal_uInt16)(aOutSz.Width()/nCharWidth) : 1; rnLines = (sal_uInt16)(aOutSz.Height()/mpImplLB->GetEntryHeight()); } else |