diff options
author | David Tardon <dtardon@redhat.com> | 2014-11-04 15:42:00 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-11-04 19:52:48 +0100 |
commit | c11c8f0a9bd2571c63b9a289b2d5de219de68a6b (patch) | |
tree | d7615a4f6f5243785e9ab6556f661b42b1bd318c /svx/source/engine3d | |
parent | 6718e5b1df2623b0a5e6c6f94ba891d5d55ad805 (diff) |
coverity#735632 division by zero
Change-Id: I756a701744998c306cc9630b604c20c44750e3b5
Diffstat (limited to 'svx/source/engine3d')
-rw-r--r-- | svx/source/engine3d/viewpt3d2.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/svx/source/engine3d/viewpt3d2.cxx b/svx/source/engine3d/viewpt3d2.cxx index 02b798821993..f59c25c5cd88 100644 --- a/svx/source/engine3d/viewpt3d2.cxx +++ b/svx/source/engine3d/viewpt3d2.cxx @@ -155,6 +155,8 @@ void Viewport3D::SetDeviceWindow(const Rectangle& rRect) break; } case AS_HOLD_X: + if (nNewW == 0) + throw o3tl::divide_by_zero(); // Adapt view height to view width fRatio = (double) nNewH / nNewW; fTmp = aViewWin.H; |