diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-28 18:56:12 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-28 18:56:12 -0500 |
commit | ac3563dce6c0cceef83f4e838365178da4602507 (patch) | |
tree | 06001d8ca1163369e2b8c2428065baa1d5d0de6c | |
parent | 3478fbd89a51072bca971b168c3c947e016b6272 (diff) |
make sure log exists before closing it
-rw-r--r-- | main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |