[Libreoffice-commits] core.git: Branch 'libreoffice-5-2-0' - vcl/source

Markus Mohrhard markus.mohrhard at googlemail.com
Mon Jul 11 15:32:31 UTC 2016


 vcl/source/opengl/OpenGLContext.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a1caaddab66634c434aadd85ecb75f53d7411c79
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Fri Jul 8 09:49:08 2016 +0200

    if mpCurrentProgram and pProgram are NULL this crashes
    
    See
    http://crashreport.libreoffice.org/stats/signature/OpenGLProgram::Reuse%28%29
    
    Change-Id: I2d1c9d9faff05d0d57a2c217a9ee594b1c22b61d
    Reviewed-on: https://gerrit.libreoffice.org/27043
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    (cherry picked from commit 5d1865293a66eb902237e70877226b7cec31105c)
    Reviewed-on: https://gerrit.libreoffice.org/27046
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit d9b6c4878198a1d7582cd98f7affb1d7a57863b9)
    Reviewed-on: https://gerrit.libreoffice.org/27072

diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 86a61e3..ffe5f36 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -815,7 +815,7 @@ OpenGLProgram* OpenGLContext::UseProgram( const OUString& rVertexShader, const O
 
     OpenGLProgram* pProgram = GetProgram( rVertexShader, rFragmentShader, preamble );
 
-    if (pProgram == mpCurrentProgram)
+    if (pProgram && pProgram == mpCurrentProgram)
     {
         VCL_GL_INFO("Context::UseProgram: Reusing existing program " << pProgram->Id());
         pProgram->Reuse();


More information about the Libreoffice-commits mailing list