Edje_Edit: Add NULL-check
Summary: Add NULL-check in: edje_edit_state_add _edje_edit_real_part_add _edje_part_recalc (edje_calc.c) Reviewers: cedric, seoz, raster Reviewed By: raster CC: reutskiy.v.v, cedric Differential Revision: https://phab.enlightenment.org/D567
This commit is contained in:
parent
6067c88b56
commit
f9fe869d23
|
@ -3177,15 +3177,17 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
|
|||
return;
|
||||
#endif
|
||||
|
||||
if (ep->param1.description->rel1.id_x >= 0)
|
||||
rp1[Rel1X] = ed->table_parts[ep->param1.description->rel1.id_x];
|
||||
if (ep->param1.description->rel2.id_x >= 0)
|
||||
rp1[Rel2X] = ed->table_parts[ep->param1.description->rel2.id_x];
|
||||
if (ep->param1.description->rel1.id_y >= 0)
|
||||
rp1[Rel1Y] = ed->table_parts[ep->param1.description->rel1.id_y];
|
||||
if (ep->param1.description->rel2.id_y >= 0)
|
||||
rp1[Rel2Y] = ed->table_parts[ep->param1.description->rel2.id_y];
|
||||
|
||||
if (ep->param1.description)
|
||||
{
|
||||
if (ep->param1.description->rel1.id_x >= 0)
|
||||
rp1[Rel1X] = ed->table_parts[ep->param1.description->rel1.id_x];
|
||||
if (ep->param1.description->rel2.id_x >= 0)
|
||||
rp1[Rel2X] = ed->table_parts[ep->param1.description->rel2.id_x];
|
||||
if (ep->param1.description->rel1.id_y >= 0)
|
||||
rp1[Rel1Y] = ed->table_parts[ep->param1.description->rel1.id_y];
|
||||
if (ep->param1.description->rel2.id_y >= 0)
|
||||
rp1[Rel2Y] = ed->table_parts[ep->param1.description->rel2.id_y];
|
||||
}
|
||||
if (ep->param2)
|
||||
{
|
||||
if (ep->param2->description->rel1.id_x >= 0)
|
||||
|
|
|
@ -2193,6 +2193,7 @@ _edje_edit_real_part_add(Evas_Object *obj, const char *name, Edje_Part_Type type
|
|||
if (_edje_real_part_get(ed, name))
|
||||
return EINA_FALSE;
|
||||
|
||||
if (ed->file)
|
||||
ce = eina_hash_find(ed->file->collection, ed->group);
|
||||
|
||||
/* Alloc Edje_Part or return */
|
||||
|
@ -3340,7 +3341,7 @@ edje_edit_state_add(Evas_Object *obj, const char *part, const char *name, double
|
|||
external->external_params = eina_list_append(external->external_params, p);
|
||||
pi++;
|
||||
}
|
||||
if (external->external_params)
|
||||
if (external->external_params && rp->typedata.swallow)
|
||||
rp->param1.external_params = _edje_external_params_parse(rp->typedata.swallow->swallowed_object, external->external_params);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue