diff options
author | Harry Jeffery <harry@exec64.co.uk> | 2015-12-10 19:22:54 +0000 |
---|---|---|
committer | Harry Jeffery <harry@exec64.co.uk> | 2015-12-10 19:22:54 +0000 |
commit | 6f369cc075729c2c14b4481834c970803a88ec25 (patch) | |
tree | 21dffe28094c58f1bd73db19a04068db43dce636 /src | |
parent | 76e4f48ca9457f88d3b6c18e8a5aad412b5fc48b (diff) | |
parent | 7d15d1b520710303aeaf9ec3ba4bc39df330ddc3 (diff) | |
download | imv-6f369cc075729c2c14b4481834c970803a88ec25.tar.gz |
Merge pull request #53 from alekskosiacka/master
don't create chequered bg if its not used
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -247,7 +247,10 @@ int main(int argc, char** argv) g_options.nearest_neighbour ? "0" : "1"); /* construct a chequered background texture */ - SDL_Texture *chequered_tex = create_chequered(renderer); + SDL_Texture *chequered_tex = NULL; + if(!g_options.solid_bg) { + chequered_tex = create_chequered(renderer); + } /* set up the required fonts and surfaces for displaying the overlay */ TTF_Init(); @@ -561,7 +564,9 @@ int main(int argc, char** argv) TTF_CloseFont(font); } TTF_Quit(); - SDL_DestroyTexture(chequered_tex); + if(chequered_tex) { + SDL_DestroyTexture(chequered_tex); + } SDL_DestroyRenderer(renderer); SDL_DestroyWindow(window); SDL_Quit(); |