From 12c0d40f82edb6bcc49cb3aa537fade6277047b8 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 18 Apr 2014 11:56:20 +0100 Subject: coverity#1202784 Division or modulo by zero Change-Id: I982b72abd92584b9ed97de593c17f2cf0b8b3667 --- sfx2/source/control/thumbnailview.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 33263344fb1a..a6115fd7b69e 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -723,7 +723,7 @@ void ThumbnailView::MakeItemVisible( sal_uInt16 nItemId ) bFound = true; } } - sal_uInt16 nRow = nPos / mnCols; + sal_uInt16 nRow = mnCols ? nPos / mnCols : 0; // Move the visible rows as little as possible to include that one if ( nRow < mnFirstLine ) -- cgit