src/video/SDL_surface.c
changeset 915 01cddd0f2efb
parent 845 333db1d87876
child 940 bb1588ebe47b
equal deleted inserted replaced
914:bbf8dcc8aed6 915:01cddd0f2efb
   899 		return;
   899 		return;
   900 	}
   900 	}
   901 	if ( --surface->refcount > 0 ) {
   901 	if ( --surface->refcount > 0 ) {
   902 		return;
   902 		return;
   903 	}
   903 	}
       
   904 	while ( surface->locked > 0 ) {
       
   905 		SDL_UnlockSurface(surface);
       
   906 	}
   904 	if ( (surface->flags & SDL_RLEACCEL) == SDL_RLEACCEL ) {
   907 	if ( (surface->flags & SDL_RLEACCEL) == SDL_RLEACCEL ) {
   905 	        SDL_UnRLESurface(surface, 0);
   908 	        SDL_UnRLESurface(surface, 0);
   906 	}
   909 	}
   907 	if ( surface->format ) {
   910 	if ( surface->format ) {
   908 		SDL_FreeFormat(surface->format);
   911 		SDL_FreeFormat(surface->format);