summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-07-08 09:49:08 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-07-08 13:29:17 +0000
commit5d1865293a66eb902237e70877226b7cec31105c (patch)
treec997e160794e9ffd596849575ed26a38f5e88af0
parentd3dd6b5c41cbd16620bf53189b9c08ad5600fdc8 (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>
-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 4d3549509a57..e5a63c0a0aaa 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -816,7 +816,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();