mirror of
https://github.com/yawut/SDL.git
synced 2026-07-06 19:54:20 -05:00
render/wiiu: Safety checks on SDL_DestroyTexture
This commit is contained in:
parent
6679bae15a
commit
9c5dbf0404
|
|
@ -135,7 +135,9 @@ int WIIU_SDL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
|
|||
|
||||
void WIIU_SDL_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture)
|
||||
{
|
||||
WIIU_TextureData *tdata = (WIIU_TextureData *) texture->driverdata;
|
||||
WIIU_TextureData *tdata;
|
||||
if (texture == NULL || texture->driverdata == NULL) return;
|
||||
tdata = (WIIU_TextureData *) texture->driverdata;
|
||||
free(tdata->texture.surface.image);
|
||||
SDL_free(tdata);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user