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
cb28716a22
commit
75f3f46a0f
|
@ -1704,6 +1704,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