diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-11 16:47:59 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-11 17:33:52 +0100 |
commit | 4e4080175abc712ce3e78c338cb8270cf2039cee (patch) | |
tree | 632228c024b2a33dff4740e8d5e6bfcb06b28e42 /sw | |
parent | edc18edbdc727757ad672773998cdab31e3bc382 (diff) |
coverity#735648 Division or modulo by zero
Change-Id: Ib70d76a022916409750887e0062d84326f7caa18
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/docvw/PostItMgr.cxx | 2 |
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(); |