From 0f86018bfed42e21adfc2261144ef2350a50ffdf Mon Sep 17 00:00:00 2001 From: MysterD Date: Sun, 27 Feb 2022 01:02:32 -0800 Subject: [PATCH] Fixed crash in configfile_save --- src/pc/configfile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pc/configfile.c b/src/pc/configfile.c index 2ff4c30d..49356f5a 100644 --- a/src/pc/configfile.c +++ b/src/pc/configfile.c @@ -423,6 +423,7 @@ void configfile_save(const char *filename) { // save enabled mods for (unsigned int i = 0; i < gModTableLocal.entryCount; i++) { struct ModListEntry* entry = &gModTableLocal.entries[i]; + if (entry == NULL) { continue; } if (!entry->enabled) { continue; } fprintf(file, "%s %s\n", "enable-mod:", entry->name); }