summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-07-08 09:49:08 +0200
committerCaolán McNamara <caolanm@redhat.com>2016-07-11 15:32:11 +0000
commita1caaddab66634c434aadd85ecb75f53d7411c79 (patch)
tree69016af8b5875284199ac9818653a4663d0e7eb1
parent5179eeacb2c1a96395ce5a0ba988e3e16129fbf1 (diff)
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@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 5d1865293a66eb902237e70877226b7cec31105c) Reviewed-on: https://gerrit.libreoffice.org/27046 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit d9b6c4878198a1d7582cd98f7affb1d7a57863b9) Reviewed-on: https://gerrit.libreoffice.org/27072
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 86a61e343d1d..ffe5f3619136 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();