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

Tomaž Vajngerl tomaz.vajngerl at collabora.co.uk
Mon Apr 11 07:45:43 UTC 2016


 vcl/opengl/texture.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 4e07c7e279b21c4ae93b832a65e221e2dab5391d
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Mon Apr 11 16:37:25 2016 +0900

    coverity#1358428 fix "Null pointer dereferences"
    
    Change-Id: I629ff54ea721f4d9626258690767088b1abfb0c6

diff --git a/vcl/opengl/texture.cxx b/vcl/opengl/texture.cxx
index b3a3626..38ff8f7 100644
--- a/vcl/opengl/texture.cxx
+++ b/vcl/opengl/texture.cxx
@@ -398,11 +398,11 @@ void OpenGLTexture::FillCoords<GL_TRIANGLES>(std::vector<GLfloat>& aCoord, const
     GLfloat y1 = 0.0f;
     GLfloat y2 = 0.0f;
 
-    double fTextureWidth(mpImpl->mnWidth);
-    double fTextureHeight(mpImpl->mnHeight);
-
     if (mpImpl)
     {
+        double fTextureWidth(mpImpl->mnWidth);
+        double fTextureHeight(mpImpl->mnHeight);
+
         x1 = (maRect.Left() + rPosAry.mnSrcX) / fTextureWidth;
         x2 = (maRect.Left() + rPosAry.mnSrcX + rPosAry.mnSrcWidth) / fTextureWidth;
 


More information about the Libreoffice-commits mailing list