forked from enlightenment/efl
elm_config: fix to check if eet_open fails
Summary: this patch adds a guard block in case of failure of eet_open(). Reviewers: bu5hm4n, zmike Reviewed By: zmike Subscribers: zmike, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9987
This commit is contained in:
parent
5a7102a589
commit
726b0ee920
|
@ -1733,6 +1733,11 @@ _config_system_load(void)
|
|||
EINA_SAFETY_ON_FALSE_RETURN_VAL(eet_data_undump(ef, "config", embedded_config, strlen(embedded_config)-1, EINA_FALSE), NULL);
|
||||
eet_close(ef);
|
||||
ef = eet_open(tmp, EET_FILE_MODE_READ);
|
||||
if (!ef)
|
||||
{
|
||||
ERR("Failed to load a fallback config file.");
|
||||
return NULL;
|
||||
}
|
||||
cfg = eet_data_read(ef, _config_edd, "config");
|
||||
eet_close(ef);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue