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)
|
static void DestroyTexture(Texture *tex)
|
||||||
{
|
{
|
||||||
if (tex) {
|
if (tex) {
|
||||||
|
if (state->renderers[0] != NULL) { /* if the renderer went away, this pointer is already bogus. */
|
||||||
SDL_DestroyTexture(tex->texture);
|
SDL_DestroyTexture(tex->texture);
|
||||||
|
}
|
||||||
SDL_free(tex);
|
SDL_free(tex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user