forked from enlightenment/efl
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;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ep->param1.description->rel1.id_x >= 0)
|
if (ep->param1.description)
|
||||||
rp1[Rel1X] = ed->table_parts[ep->param1.description->rel1.id_x];
|
{
|
||||||
if (ep->param1.description->rel2.id_x >= 0)
|
if (ep->param1.description->rel1.id_x >= 0)
|
||||||
rp1[Rel2X] = ed->table_parts[ep->param1.description->rel2.id_x];
|
rp1[Rel1X] = ed->table_parts[ep->param1.description->rel1.id_x];
|
||||||
if (ep->param1.description->rel1.id_y >= 0)
|
if (ep->param1.description->rel2.id_x >= 0)
|
||||||
rp1[Rel1Y] = ed->table_parts[ep->param1.description->rel1.id_y];
|
rp1[Rel2X] = ed->table_parts[ep->param1.description->rel2.id_x];
|
||||||
if (ep->param1.description->rel2.id_y >= 0)
|
if (ep->param1.description->rel1.id_y >= 0)
|
||||||
rp1[Rel2Y] = ed->table_parts[ep->param1.description->rel2.id_y];
|
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)
|
||||||
{
|
{
|
||||||
if (ep->param2->description->rel1.id_x >= 0)
|
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))
|
if (_edje_real_part_get(ed, name))
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
|
|
||||||
|
if (ed->file)
|
||||||
ce = eina_hash_find(ed->file->collection, ed->group);
|
ce = eina_hash_find(ed->file->collection, ed->group);
|
||||||
|
|
||||||
/* Alloc Edje_Part or return */
|
/* 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);
|
external->external_params = eina_list_append(external->external_params, p);
|
||||||
pi++;
|
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);
|
rp->param1.external_params = _edje_external_params_parse(rp->typedata.swallow->swallowed_object, external->external_params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue