Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: cedric
Differential Revision: https://phab.enlightenment.org/D3186
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
EAPI void
_edje_program_insert(Edje_Part_Collection *edc, Edje_Program *p)
{
- Edje_Program ***array;
+ Edje_Program ***array, **temp;
unsigned int *count;
if (!p->signal && !p->source)
count = &edc->programs.fnmatch_count;
}
+ temp = *array;
*array = realloc(*array, sizeof (Edje_Program *) * (*count + 1));
- (*array)[(*count)++] = p;
+ if (*array)
+ {
+ (*array)[(*count)++] = p;
+ }
+ else
+ {
+ *array = temp;
+ }
}
const char *