mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-01-08 06:13:19 +00:00
testaudio: if the SDL_Renderer is already gone, don't destroy SDL_Textures.
This commit is contained in:
@@ -732,7 +732,9 @@ static void LoadStockWavThings(void)
|
||||
static void DestroyTexture(Texture *tex)
|
||||
{
|
||||
if (tex) {
|
||||
SDL_DestroyTexture(tex->texture);
|
||||
if (state->renderers[0] != NULL) { /* if the renderer went away, this pointer is already bogus. */
|
||||
SDL_DestroyTexture(tex->texture);
|
||||
}
|
||||
SDL_free(tex);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user