diff --git a/sdl/sdl1/main.c b/sdl/sdl1/main.c index c4ab724..fefcb5e 100644 --- a/sdl/sdl1/main.c +++ b/sdl/sdl1/main.c @@ -244,10 +244,7 @@ static void sdl_video_update() static void sdl_video_close() { - if (sdl_video.surf_bitmap) - SDL_FreeSurface(sdl_video.surf_bitmap); - if (sdl_video.surf_screen) - SDL_FreeSurface(sdl_video.surf_screen); + SDL_FreeSurface(sdl_video.surf_bitmap); } /* Timer Sync */ diff --git a/sdl/sdl2/main.c b/sdl/sdl2/main.c index fb42b68..7e9b6ef 100644 --- a/sdl/sdl2/main.c +++ b/sdl/sdl2/main.c @@ -250,10 +250,8 @@ static void sdl_video_update() static void sdl_video_close() { - if (sdl_video.surf_bitmap) - SDL_FreeSurface(sdl_video.surf_bitmap); - if (sdl_video.surf_screen) - SDL_FreeSurface(sdl_video.surf_screen); + SDL_FreeSurface(sdl_video.surf_bitmap); + SDL_DestroyWindow(sdl_video.window); } /* Timer Sync */