summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index 49e9a00..176f972 100644
--- a/main.c
+++ b/main.c
@@ -542,7 +542,7 @@ int main(int argc, char **argv) {
if (ted->menu)
menu_close(ted, false); // free any memory used by the current menu
- fclose(log);
+ if (log) fclose(log);
SDL_GL_DeleteContext(glctx);
SDL_DestroyWindow(window);