From ac3563dce6c0cceef83f4e838365178da4602507 Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Thu, 28 Jan 2021 18:56:12 -0500 Subject: make sure log exists before closing it --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3