aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2015-11-28 20:46:54 +0000
committerHarry Jeffery <harry@exec64.co.uk>2015-11-28 20:46:54 +0000
commitd5c493878d955cf407296ebad4ff8cce3646ac51 (patch)
tree894e1e970045164305909b14b3c005fdf16b05b6 /src
parent3b5c777e4b545a72f5c74630ac0be99c98dae6b6 (diff)
downloadimv-d5c493878d955cf407296ebad4ff8cce3646ac51.tar.gz
Clean up overlays on exit
Diffstat (limited to 'src')
-rw-r--r--src/main.c6
1 files changed, 6 insertions, 0 deletions
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);