[FIX] Log error if the config was not parsed

This commit is contained in:
LDA 2025-01-29 19:15:23 +01:00
commit b485298fbc

View file

@ -36,6 +36,12 @@ ParseeConfigLoad(char *conf)
return; return;
} }
json = JsonDecode(stream); json = JsonDecode(stream);
if (!json)
{
Log(LOG_ERR, "Could not parse config JSON");
StreamClose(stream);
return;
}
config = Malloc(sizeof(*config)); config = Malloc(sizeof(*config));
#define CopyToStr(to, str) config->to = StrDuplicate( \ #define CopyToStr(to, str) config->to = StrDuplicate( \