Skip to content

Commit

Permalink
You can't free locked surfaces!
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jul 25, 2004
1 parent 74a1c84 commit 0b9b653
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/video/SDL_surface.c
Expand Up @@ -901,6 +901,9 @@ void SDL_FreeSurface (SDL_Surface *surface)
if ( --surface->refcount > 0 ) {
return;
}
while ( surface->locked > 0 ) {
SDL_UnlockSurface(surface);
}
if ( (surface->flags & SDL_RLEACCEL) == SDL_RLEACCEL ) {
SDL_UnRLESurface(surface, 0);
}
Expand Down

0 comments on commit 0b9b653

Please sign in to comment.