diff src/video/SDL_surface.c @ 915:01cddd0f2efb

You can't free locked surfaces!
author Sam Lantinga <slouken@libsdl.org>
date Sun, 25 Jul 2004 18:43:07 +0000
parents 333db1d87876
children bb1588ebe47b
line wrap: on
line diff
--- 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);
 	}