From d5c493878d955cf407296ebad4ff8cce3646ac51 Mon Sep 17 00:00:00 2001 From: Harry Jeffery Date: Sat, 28 Nov 2015 20:46:54 +0000 Subject: Clean up overlays on exit --- src/main.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/main.c b/src/main.c index 1ce274b..aa0899f 100644 --- a/src/main.c +++ b/src/main.c @@ -423,6 +423,12 @@ int main(int argc, char** argv) TTF_CloseFont(font); } TTF_Quit(); + if(overlay_surf) { + SDL_FreeSurface(overlay_surf); + } + if(overlay_tex) { + SDL_DestroyTexture(overlay_tex); + } SDL_DestroyTexture(chequered_tex); SDL_DestroyRenderer(renderer); SDL_DestroyWindow(window); -- cgit v1.2.3