summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrii Kroitor <an.kroitor@samsung.com>2015-04-01 07:23:38 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-04-01 07:25:12 -0400
commit7271c99b3c06cccf9fe1b3b61071559be58caf71 (patch)
tree7f3dc6de5670ed0ecf9241f26df25d7f1dec374a /src
parenteae15fbb28a8ee6adbd2afec31597c6f56381f39 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/lib/edje/edje_calc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 4ef5a5a0a4..e9329d52ad 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
627 chosen_desc = ep->chosen_description; 627 chosen_desc = ep->chosen_description;
628 ep->param1.description = epd1; 628 ep->param1.description = epd1;
629 ep->chosen_description = epd1; 629 ep->chosen_description = epd1;
630 change_w = ep->chosen_description->fixed.w != chosen_desc->fixed.w; 630 if (chosen_desc)
631 change_h = ep->chosen_description->fixed.h != chosen_desc->fixed.h; 631 {
632 632 change_w = ep->chosen_description->fixed.w != chosen_desc->fixed.w;
633 change_h = ep->chosen_description->fixed.h != chosen_desc->fixed.h;
634 }
633 _edje_real_part_rel_to_apply(ed, ep, &ep->param1); 635 _edje_real_part_rel_to_apply(ed, ep, &ep->param1);
634 636
635 if (ep->param2) 637 if (ep->param2)
@@ -646,7 +648,7 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl
646 { 648 {
647 if (ep->part->type == EDJE_PART_TYPE_EXTERNAL) 649 if (ep->part->type == EDJE_PART_TYPE_EXTERNAL)
648 _edje_external_recalc_apply(ed, ep, NULL, chosen_desc); 650 _edje_external_recalc_apply(ed, ep, NULL, chosen_desc);
649 else if (ep->part->type == EDJE_PART_TYPE_GROUP) 651 else if ((chosen_desc) && (ep->part->type == EDJE_PART_TYPE_GROUP))
650 { 652 {
651 Edje_Size *min, *max, *pmin, *pmax; 653 Edje_Size *min, *max, *pmin, *pmax;
652 654