mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[common] option: fix crash on failure to parse invalid config file
This commit is contained in:
parent
7cc0f7cb99
commit
ce9b94e93d
@ -415,6 +415,13 @@ bool option_load(const char * filename)
|
||||
case '\n':
|
||||
if (name)
|
||||
{
|
||||
if (!module)
|
||||
{
|
||||
DEBUG_ERROR("Syntax error on line %d, module not specified for option", lineno);
|
||||
result = false;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
struct Option * o = option_get(module, name);
|
||||
if (!o)
|
||||
DEBUG_WARN("Ignored unknown option %s:%s", module, name);
|
||||
|
Loading…
Reference in New Issue
Block a user