canvas vg: check expcetional case.

Summary: if file is not exists.

Reviewers: devilhorns, #committers, zmike

Reviewed By: #committers, zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6546
This commit is contained in:
Hermet Park 2018-07-11 16:08:48 +09:00
parent 8cd3860d00
commit b29209ac4b
1 changed files with 2 additions and 1 deletions

View File

@ -231,7 +231,8 @@ evas_cache_vg_file_info(const char *file, const char *key)
if (!vd)
{
vd = _vg_load_from_file(file, key);
eina_hash_add(vg_cache->vg_hash, eina_strbuf_string_get(hash_key), vd);
//File is exists.
if (vd) eina_hash_add(vg_cache->vg_hash, eina_strbuf_string_get(hash_key), vd);
}
eina_strbuf_free(hash_key);
return vd;