From a3c135616a786874df907ded8d169dad21eb257b Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 22 Mar 2019 09:43:16 -0400 Subject: [PATCH] SDL 1.2 ignores SDL_FreeSurface() attempts on the screen surface. Fixes Bugzilla #4559. --- src/SDL12_compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c index 1dfb0d201..bee0507bc 100644 --- a/src/SDL12_compat.c +++ b/src/SDL12_compat.c @@ -2319,7 +2319,7 @@ SDL_CreateRGBSurfaceFrom(void *pixels, int width, int height, int depth, int pit DECLSPEC void SDLCALL SDL_FreeSurface(SDL12_Surface *surface12) { - if (surface12) { + if (surface12 && (surface12 != VideoSurface12)) { SDL20_FreeSurface(surface12->surface20); if (surface12->format) { SDL20_free(surface12->format->palette);