forked from enlightenment/efl
evas: simplify path logic and make backend code more robust.
Fix CID 1039665.
This commit is contained in:
parent
522cb7756d
commit
d3bc06ae33
|
@ -633,7 +633,7 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, const char *source,
|
|||
int fsize = 0;
|
||||
|
||||
fdata = eet_read(ef, nm, &fsize);
|
||||
if ((fdata) && (fsize > 0))
|
||||
if (fdata)
|
||||
{
|
||||
font = evas->engine.func->font_memory_load(evas->engine.data.output, source, nm, size, fdata, fsize, wanted_rend);
|
||||
free(fdata);
|
||||
|
|
|
@ -135,6 +135,7 @@ evas_common_font_source_memory_load(const char *name, const void *data, int data
|
|||
RGBA_Font_Source *fs;
|
||||
|
||||
assert(name != NULL);
|
||||
if (data_size <= 0) return NULL;
|
||||
fs = calloc(1, sizeof(RGBA_Font_Source) + data_size);
|
||||
if (!fs) return NULL;
|
||||
fs->data = ((unsigned char *)fs) + sizeof(RGBA_Font_Source);
|
||||
|
|
Loading…
Reference in New Issue