Kaydet (Commit) 086611d2 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1202783 Division or modulo by zero

Change-Id: I17892b9daa3be450001ac88239008d0d27f4a01f
üst 9823f731
...@@ -1819,7 +1819,7 @@ void ValueSet::SelectItem( sal_uInt16 nItemId ) ...@@ -1819,7 +1819,7 @@ void ValueSet::SelectItem( sal_uInt16 nItemId )
bool bNewLine = false; bool bNewLine = false;
// if necessary scroll to the visible area // if necessary scroll to the visible area
if ( mbScroll && nItemId ) if (mbScroll && nItemId && mnCols)
{ {
sal_uInt16 nNewLine = (sal_uInt16)(nItemPos / mnCols); sal_uInt16 nNewLine = (sal_uInt16)(nItemPos / mnCols);
if ( nNewLine < mnFirstLine ) if ( nNewLine < mnFirstLine )
......
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