Skip to content

Commit

Permalink
Fixes #2296 - SDL_GL_UnbindTexture segfaults (thanks Daniel B?nzli)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabomdq committed Feb 24, 2014
1 parent b814f23 commit 6ee12d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/render/SDL_render.c
Expand Up @@ -1876,7 +1876,9 @@ int SDL_GL_UnbindTexture(SDL_Texture *texture)

CHECK_TEXTURE_MAGIC(texture, -1);
renderer = texture->renderer;
if (renderer && renderer->GL_UnbindTexture) {
if (texture->native) {
return SDL_GL_UnbindTexture(texture->native);
} else if (renderer && renderer->GL_UnbindTexture) {
return renderer->GL_UnbindTexture(renderer, texture);
}

Expand Down

0 comments on commit 6ee12d6

Please sign in to comment.