mirror of
https://github.com/yawut/SDL.git
synced 2026-08-28 03:34:44 -05:00
You can't free locked surfaces!
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user