mirror of https://github.com/omar-polo/gmid.git
don't crash if -n is given without -c
If -n is given without -c, config_path is still NULL and it would crash due to a NULL deference.
This commit is contained in:
parent
83272dfee9
commit
2e31927606
2
gmid.c
2
gmid.c
|
@ -638,6 +638,8 @@ main(int argc, char **argv)
|
||||||
fatal("can't specify options in config mode.");
|
fatal("can't specify options in config mode.");
|
||||||
|
|
||||||
if (conftest) {
|
if (conftest) {
|
||||||
|
if (config_path == NULL)
|
||||||
|
fatal("missing configuration");
|
||||||
parse_conf(config_path);
|
parse_conf(config_path);
|
||||||
puts("config OK");
|
puts("config OK");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue