Memory leak fix for DirectX software surfaces

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40423
This commit is contained in:
Sam Lantinga 2002-07-03 04:54:55 +00:00
parent 38cfc74872
commit 69c56b9025

View file

@ -812,7 +812,7 @@ void SDL_FreeSurface (SDL_Surface *surface)
SDL_FreeBlitMap(surface->map);
surface->map = NULL;
}
if ( (surface->flags & SDL_HWSURFACE) == SDL_HWSURFACE ) {
if ( surface->hwdata ) {
SDL_VideoDevice *video = current_video;
SDL_VideoDevice *this = current_video;
video->FreeHWSurface(this, surface);