Fixes #2296 - SDL_GL_UnbindTexture segfaults (thanks Daniel Bünzli)
This commit is contained in:
parent
d210539a55
commit
e8ff2a9d5b
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue