[Libreoffice-commits] core.git: vcl/opengl

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sat Jul 20 17:00:54 UTC 2019


 vcl/opengl/gdiimpl.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 57dcc00dd674219d4e50f9cb4fa6b797762af223
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Jul 20 14:51:52 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Jul 20 18:59:53 2019 +0200

    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 at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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;
 


More information about the Libreoffice-commits mailing list