shithub: cstory

Download patch

ref: aa3cd55b432649bb2e61a5176c3ee53ae345c2f1
parent: bf93334b94968dc84bfabe1d1d1fcfb7fb643765
author: Clownacy <Clownacy@users.noreply.github.com>
date: Sun Sep 13 08:30:56 EDT 2020

Fix SDLTexture surface freeing

--- a/src/Backends/Rendering/SDLTexture.cpp
+++ b/src/Backends/Rendering/SDLTexture.cpp
@@ -182,6 +182,9 @@
 	if (surface->prev != NULL)
 		surface->prev->next = surface->next;
 
+	if (surface->prev == NULL)
+		surface_list_head = surface->next;
+
 	SDL_DestroyTexture(surface->texture);
 	free(surface);
 }