aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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();