diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-07-20 14:51:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-07-20 18:59:53 +0200 |
commit | 57dcc00dd674219d4e50f9cb4fa6b797762af223 (patch) | |
tree | 8ee2c1095c4af29203403ea32a0d7ca67be5cb63 /vcl | |
parent | 586cfef1df9fb99aaf018029b7f06363e96bc72b (diff) |
cid#1448247 Division or modulo by float zero
Change-Id: I591ac0446494a8a8c4b3481bdf91e60de0c9ebe1
Reviewed-on: https://gerrit.libreoffice.org/76011
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/opengl/gdiimpl.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index 1924d46f268b..d7187c9921cc 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -987,6 +987,9 @@ bool scaleTexture(const rtl::Reference< OpenGLContext > &xContext, { int nWidth = rTexture.GetWidth(); int nHeight = rTexture.GetHeight(); + if (nWidth == 0 || nHeight == 0) + return false; + int nNewWidth = nWidth / ixscale; int nNewHeight = nHeight / iyscale; |