summaryrefslogtreecommitdiff
path: root/svx/source/engine3d/viewpt3d2.cxx
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-11-04 15:42:00 +0100
committerDavid Tardon <dtardon@redhat.com>2014-11-04 19:52:48 +0100
commitc11c8f0a9bd2571c63b9a289b2d5de219de68a6b (patch)
treed7615a4f6f5243785e9ab6556f661b42b1bd318c /svx/source/engine3d/viewpt3d2.cxx
parent6718e5b1df2623b0a5e6c6f94ba891d5d55ad805 (diff)
coverity#735632 division by zero
Change-Id: I756a701744998c306cc9630b604c20c44750e3b5
Diffstat (limited to 'svx/source/engine3d/viewpt3d2.cxx')
-rw-r--r--svx/source/engine3d/viewpt3d2.cxx2
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;