Skip to content

Commit

Permalink
Issue 1015: Adding null-checks to GLRenderer::draw_surface
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbi committed Sep 12, 2013
1 parent ae784ac commit 4f4c175
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/video/gl/gl_renderer.cpp
Expand Up @@ -114,8 +114,20 @@ void
GLRenderer::draw_surface(const DrawingRequest& request)
{
const Surface* surface = (const Surface*) request.request_data;
if(surface == NULL)
{
return;
}
GLTexture* gltexture = static_cast<GLTexture*>(surface->get_texture().get());
if(gltexture == NULL)
{
return;
}
GLSurfaceData *surface_data = static_cast<GLSurfaceData*>(surface->get_surface_data());
if(surface_data == NULL)
{
return;
}

GLuint th = gltexture->get_handle();
if (th != last_texture) {
Expand Down

0 comments on commit 4f4c175

Please sign in to comment.