discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7271c99b3c06cccf9fe1b3b61071559be58caf71
commit 7271c99b3c06cccf9fe1b3b61071559be58caf71 Author: Andrii Kroitor <an.kroi...@samsung.com> Date: Wed Apr 1 07:23:38 2015 -0400 edje_calc: fix SEGFAULT on new parts Summary: new part added with edje_edit_part_add has NULL previous description Reviewers: cedric, zmike, seoz, Hermet, raster Subscribers: FurryMyad, cedric, reutskiy.v.v Differential Revision: https://phab.enlightenment.org/D2272 --- src/lib/edje/edje_calc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c index 4ef5a5a..e9329d5 100644 --- a/src/lib/edje/edje_calc.c +++ b/src/lib/edje/edje_calc.c @@ -627,9 +627,11 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl chosen_desc = ep->chosen_description; ep->param1.description = epd1; ep->chosen_description = epd1; - change_w = ep->chosen_description->fixed.w != chosen_desc->fixed.w; - change_h = ep->chosen_description->fixed.h != chosen_desc->fixed.h; - + if (chosen_desc) + { + change_w = ep->chosen_description->fixed.w != chosen_desc->fixed.w; + change_h = ep->chosen_description->fixed.h != chosen_desc->fixed.h; + } _edje_real_part_rel_to_apply(ed, ep, &ep->param1); if (ep->param2) @@ -646,7 +648,7 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl { if (ep->part->type == EDJE_PART_TYPE_EXTERNAL) _edje_external_recalc_apply(ed, ep, NULL, chosen_desc); - else if (ep->part->type == EDJE_PART_TYPE_GROUP) + else if ((chosen_desc) && (ep->part->type == EDJE_PART_TYPE_GROUP)) { Edje_Size *min, *max, *pmin, *pmax; --