config_replace - do early return if global is NULL

This commit is contained in:
twinaphex 2016-07-01 08:54:31 +02:00
parent 2520a8a5f6
commit 2009c72baa

View File

@ -3157,7 +3157,7 @@ bool config_replace(char *path)
settings_t *settings = config_get_ptr();
global_t *global = global_get_ptr();
if (!path)
if (!path || !global)
return false;
/* If config file to be replaced is the same as the