ref: 05c3023d2b891c2d4361822b439c59e5828eee79
parent: 1f07cbb79638fa2822cbe577cd5e1010190c8950
author: Fabian Greffrath <[email protected]>
date: Fri Dec 21 08:14:56 EST 2018
video: point destroyed textures to NULL When a renderer gets destroyed, all associated textures get destroyed as well, so point them to NULL to prevent them being destroyed again.
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -1239,6 +1239,9 @@
if (renderer != NULL)
{
SDL_DestroyRenderer(renderer);
+ // all associated textures get destroyed
+ texture = NULL;
+ texture_upscaled = NULL;
}
renderer = SDL_CreateRenderer(screen, -1, renderer_flags);