# HG changeset patch # User Sam Lantinga # Date 1090780987 0 # Node ID 01cddd0f2efb111e4302a6388ae1dd7a10ff11c5 # Parent bbf8dcc8aed6b63164bb99cb6c9da9f274fe6684 You can't free locked surfaces! diff -r bbf8dcc8aed6 -r 01cddd0f2efb src/video/SDL_surface.c --- a/src/video/SDL_surface.c Sun Jul 25 18:31:50 2004 +0000 +++ b/src/video/SDL_surface.c Sun Jul 25 18:43:07 2004 +0000 @@ -901,6 +901,9 @@ if ( --surface->refcount > 0 ) { return; } + while ( surface->locked > 0 ) { + SDL_UnlockSurface(surface); + } if ( (surface->flags & SDL_RLEACCEL) == SDL_RLEACCEL ) { SDL_UnRLESurface(surface, 0); }