From 4e4080175abc712ce3e78c338cb8270cf2039cee Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 11 Oct 2014 16:47:59 +0100 Subject: coverity#735648 Division or modulo by zero Change-Id: Ib70d76a022916409750887e0062d84326f7caa18 --- sw/source/uibase/docvw/PostItMgr.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw') diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index ae461032e4ae..fafcbcdd79ce 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -992,7 +992,7 @@ bool SwPostItMgr::LayoutByPage(std::list &aVisiblePostItList,cons bool bScrollbars = false; // do all necessary resizings - if (lVisibleHeight < lNeededHeight) + if (!aVisiblePostItList.empty() && lVisibleHeight < lNeededHeight) { // ok, now we have to really resize and adding scrollbars const long lAverageHeight = (lVisibleHeight - aVisiblePostItList.size()*GetSpaceBetween()) / aVisiblePostItList.size(); -- cgit