evas cserve - handle possilbe null ref and fentry pointers

this fixes CID 1193209 with possible NULL refs.
This commit is contained in:
Carsten Haitzler 2014-08-14 17:16:02 +09:00
parent 3ad7feafe3
commit c87748a7c1
1 changed files with 4 additions and 0 deletions

View File

@ -2898,7 +2898,11 @@ cserve2_cache_image_entry_create(Client *client, int rid,
if (!ientry)
return -1;
if (!ref)
return -1;
fentry = _file_entry_find(ref->entry->id);
if (!fentry)
return -1;
fentry->images = eina_list_append(fentry->images, ientry);
if (opts && opts->scale_load.dst_w && opts->scale_load.dst_h)