Kaydet (Commit) 6718e5b1 authored tarafından David Tardon's avatar David Tardon

coverity#735631 division by zero

Change-Id: I3082395b89c0ecc2ac754cf845ea7892ffea0a9b
üst 5978dd0d
......@@ -19,6 +19,7 @@
#include <svx/viewpt3d.hxx>
#include <basegfx/range/b3drange.hxx>
#include <o3tl/numeric.hxx>
Viewport3D::Viewport3D() :
aVRP(0, 0, 5),
......@@ -162,6 +163,8 @@ void Viewport3D::SetDeviceWindow(const Rectangle& rRect)
break;
case AS_HOLD_Y:
if (nNewH == 0)
throw o3tl::divide_by_zero();
// Adapt view width to view height
fRatio = (double) nNewW / nNewH;
fTmp = aViewWin.W;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment