summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-11-21 09:24:11 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-11-21 11:55:11 +0000
commitaf26bb77d2dd63fd6d5473c234f746b3b38dc3f6 (patch)
tree0ea43475730e0ab9cd7c33a61a4a525a6ba8730c
parentecc56da366960b642d0a7da1b4a47245243252f8 (diff)
coverity#1255388 Division or modulo by float zero
and coverity#1255387 Division or modulo by float zero Change-Id: I86c6d5874a7a2c2eecefe7f786edff89ff50ffbf
-rw-r--r--vcl/opengl/gdiimpl.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 3929d63b3aaf..1abc86e11098 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -727,6 +727,9 @@ void OpenGLSalGraphicsImpl::DrawTransformedTexture(
const basegfx::B2DPoint& rX,
const basegfx::B2DPoint& rY )
{
+ if (!rTexture.GetWidth() || !rTexture.GetHeight())
+ return;
+
const basegfx::B2DVector aXRel = rX - rNull;
const basegfx::B2DVector aYRel = rY - rNull;
const float aValues[] = {