You can't free locked surfaces!

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40916
This commit is contained in:
Sam Lantinga 2004-07-25 18:43:07 +00:00
parent a69bbd4764
commit ee92972637

View file

@ -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);
}