[Libreoffice-commits] core.git: 2 commits - vcl/opengl vcl/source
Miklos Vajna
vmiklos at collabora.co.uk
Thu Sep 10 04:54:41 PDT 2015
vcl/opengl/gdiimpl.cxx | 6 ++++++
vcl/source/opengl/OpenGLContext.cxx | 7 +++++++
2 files changed, 13 insertions(+)
New commits:
commit 0e682d47a792497211d33779312ca2cad9874ffb
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Sep 10 11:40:33 2015 +0200
windows opengl: mpProgram seen as 0
in JunitTest_sc_unoapi_3.
Change-Id: Ic7e32979f31a3376b67eb3bef59373632461e39f
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 2b11010..6580f43 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -766,6 +766,12 @@ void OpenGLSalGraphicsImpl::DrawTrapezoid( const basegfx::B2DTrapezoid& trapezoi
aVertices[j+1] = GLfloat(rPt.getY());
}
+ if (!mpProgram)
+ {
+ SAL_WARN("vcl.opengl", "OpenGLSalGraphicsImpl::DrawTrapezoid: mpProgram is 0");
+ return;
+ }
+
ApplyProgramMatrices();
mpProgram->SetVertices( &aVertices[0] );
glDrawArrays( GL_TRIANGLE_FAN, 0, nPoints );
commit 57fc41adc9292f8980bb8bbbb0d7983310fe6fe3
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Sep 10 11:39:44 2015 +0200
windows opengl: mpCurrentProgram seen as 0
in JunitTest_sc_unoapi_3.
Change-Id: Ibe12a31c1158f782bd7df115171b07e1843d025c
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index f65341a..6fd18c8 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -1654,6 +1654,13 @@ OpenGLProgram* OpenGLContext::UseProgram( const OUString& rVertexShader, const O
return pProgram;
mpCurrentProgram = pProgram;
+
+ if (!mpCurrentProgram)
+ {
+ SAL_WARN("vcl.opengl", "OpenGLContext::UseProgram: mpCurrentProgram is 0");
+ return 0;
+ }
+
mpCurrentProgram->Use();
return mpCurrentProgram;
More information about the Libreoffice-commits
mailing list