aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2015-12-10 19:22:54 +0000
committerHarry Jeffery <harry@exec64.co.uk>2015-12-10 19:22:54 +0000
commit6f369cc075729c2c14b4481834c970803a88ec25 (patch)
tree21dffe28094c58f1bd73db19a04068db43dce636 /src
parent76e4f48ca9457f88d3b6c18e8a5aad412b5fc48b (diff)
parent7d15d1b520710303aeaf9ec3ba4bc39df330ddc3 (diff)
downloadimv-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.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 972e911..2248f83 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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();