diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index a3162dd1c..dfbf99b8e 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -9217,14 +9217,15 @@ int32_t loaddefinitions_game(const char *fn, int32_t preload) UNREFERENCED_PARAMETER(preload); script = scriptfile_fromfile(fn); - if (!script) return -1; - - parsegroupfiles(script); + if (script) + parsegroupfiles(script); for (i=0; i < g_defModulesNum; ++i) parsegroupfiles_include(g_defModules[i], NULL, "null"); - scriptfile_close(script); + if (script) + scriptfile_close(script); + scriptfile_clearsymbols(); return 0; diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 1d9a44300..399bffb09 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -9824,14 +9824,15 @@ int32_t loaddefinitions_game(const char *fn, int32_t preload) int32_t i; script = scriptfile_fromfile(fn); - if (!script) return -1; - - parsedefinitions_game(script, preload); + if (script) + parsedefinitions_game(script, preload); for (i=0; i < g_defModulesNum; ++i) parsedefinitions_game_include(g_defModules[i], NULL, "null", preload); - scriptfile_close(script); + if (script) + scriptfile_close(script); + scriptfile_clearsymbols(); return 0;