diff options
Diffstat (limited to 'svx/source/engine3d/obj3d.cxx')
-rw-r--r-- | svx/source/engine3d/obj3d.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx index 9e8615306a91..eee59ad5bbec 100644 --- a/svx/source/engine3d/obj3d.cxx +++ b/svx/source/engine3d/obj3d.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <o3tl/numeric.hxx> #include "svx/svdstr.hrc" #include "svdglob.hxx" @@ -397,6 +398,9 @@ void E3dObject::NbcMove(const Size& rSize) basegfx::B3DRange aEyeVol(pScene->GetBoundVolume()); aEyeVol.transform(aViewInfo3D.getOrientation()); + if ((aRect.GetWidth() == 0) || (aRect.GetHeight() == 0)) + throw o3tl::divide_by_zero(); + // build relative movement vector in eye coordinates basegfx::B3DPoint aMove( (double)rSize.Width() * aEyeVol.getWidth() / (double)aRect.GetWidth(), |