Kaydet (Commit) 991fb393 authored tarafından David Tardon's avatar David Tardon

coverity#735653 avoid division by 0

Change-Id: Ie3ec074292467f096e69142dc599b0e29e1e7f7b
üst 3dcbcd12
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment