summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-11 16:47:59 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-10-11 17:33:52 +0100
commit4e4080175abc712ce3e78c338cb8270cf2039cee (patch)
tree632228c024b2a33dff4740e8d5e6bfcb06b28e42 /sw
parentedc18edbdc727757ad672773998cdab31e3bc382 (diff)
coverity#735648 Division or modulo by zero
Change-Id: Ib70d76a022916409750887e0062d84326f7caa18
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx2
1 files changed, 1 insertions, 1 deletions
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<SwSidebarWin*> &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();