Skip to content

Commit

Permalink
SDL 1.2 ignores SDL_FreeSurface() attempts on the screen surface.
Browse files Browse the repository at this point in the history
Fixes Bugzilla #4559.
  • Loading branch information
icculus committed Mar 22, 2019
1 parent 40f37f8 commit a3c1356
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SDL12_compat.c
Expand Up @@ -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);
Expand Down

0 comments on commit a3c1356

Please sign in to comment.