edje: Edje_Edit - fix size memory calculating for realloc array of tweens.
Summary: If in _Edje_Part_Description_Spec_Image->tweens wasn't added no one image, when edje object was loaded from file, then realloc will work as free(), because size of reallocating memory always will equal 0. @fix Reviewers: raster, seoz, cedric, Hermet, reutskiy.v.v Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1160 Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
This commit is contained in:
parent
a26546bc6b
commit
3d2a46a417
|
@ -7688,7 +7688,7 @@ edje_edit_state_tween_add(Evas_Object *obj, const char *part, const char *state,
|
||||||
|
|
||||||
/* add to tween list */
|
/* add to tween list */
|
||||||
tmp = realloc(img->image.tweens,
|
tmp = realloc(img->image.tweens,
|
||||||
sizeof (Edje_Part_Image_Id*) * img->image.tweens_count);
|
sizeof(Edje_Part_Image_Id *) * (img->image.tweens_count + 1));
|
||||||
if (!tmp)
|
if (!tmp)
|
||||||
{
|
{
|
||||||
free(i);
|
free(i);
|
||||||
|
|
Loading…
Reference in New Issue