diff options
author | David Tardon <dtardon@redhat.com> | 2014-10-17 14:05:03 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-10-17 14:06:26 +0200 |
commit | 991fb393678f8b7893c9e3c74ecd1401417067cb (patch) | |
tree | ea93a2619f9a33a98949ea583bff9741f42262bb | |
parent | 3dcbcd120c2b42e291f6ec65db7b824cf7acd4f7 (diff) |
coverity#735653 avoid division by 0
Change-Id: Ie3ec074292467f096e69142dc599b0e29e1e7f7b
-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 df914a5c78c8..d03b32184b6f 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -1191,7 +1191,7 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, s Rectangle aClip( aPos, aSize ); pDev->IntersectClipRegion( aClip ); - sal_uInt16 nLines = (sal_uInt16) ( (aSize.Height()-nEditHeight) / nTextHeight ); + sal_uInt16 nLines = (sal_uInt16) ( ( nTextHeight > 0 ) ? ( (aSize.Height()-nEditHeight) / nTextHeight ) : 1 ); if ( !nLines ) nLines = 1; sal_uInt16 nTEntry = IsReallyVisible() ? mpImplLB->GetTopEntry() : 0; |