edje convert - make realloc fatal and complain about it

cleaner error handling
This commit is contained in:
Carsten Haitzler 2017-07-24 13:09:26 +09:00
parent 4b4564c857
commit 92fb46fb50
1 changed files with 5 additions and 1 deletions

View File

@ -192,7 +192,11 @@ _edje_collection_program_add(Edje_Program ***array,
Edje_Program **tmp;
tmp = realloc(*array, sizeof (Edje_Program*) * (*count + 1));
if (!tmp) return;
if (!tmp)
{
error_and_abort(ef, "Not enough memory");
return;
}
tmp[(*count)++] = add;
*array = tmp;