Fixes #2296 - SDL_GL_UnbindTexture segfaults (thanks Daniel B?nzli)

This commit is contained in:
Gabriel Jacobo committed 2014-02-24 18:57:22 -03:00
1 parent b814f23a21
commit 6ee12d6ccc
1 file changed
+3 -1
+3 -1
View File
@@ -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);
}