diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index 5c7d7b8c5..698e7b54d 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -6504,7 +6504,7 @@ int app_main(int argc, char const * const * argv) char *const setupFileName = Xstrdup(g_setupFileName); char *const p = strtok(setupFileName, "."); - if (!Bstrcmp(g_setupFileName, SETUPFILENAME)) + if (!p || !Bstrcmp(g_setupFileName, SETUPFILENAME)) Bsprintf(tempbuf, "settings.cfg"); else Bsprintf(tempbuf, "%s_settings.cfg", p);