diff options
author | Vitalii Vorobiov <vi.vorobiov@samsung.com> | 2015-02-09 18:58:26 +0200 |
---|---|---|
committer | Vitalii Vorobiov <vi.vorobiov@samsung.com> | 2015-02-09 18:58:26 +0200 |
commit | 1d4e8c2f1d58af2d3b730565d4d476cf87c412c3 (patch) | |
tree | ee8cd13f6c1faf13d22d2ff6cf85a15347d72d80 /src/lib/edje/edje_edit.c | |
parent | 8fbee3fac069f62ce41996fc8f20030ae208ad91 (diff) |
Edje: edje_edit - fix Segmentation Fault on new BOX part
After adding new part (with type BOX) there was a SIGSEV because
of structure that wasn't initialized.
@fix
Diffstat (limited to '')
-rw-r--r-- | src/lib/edje/edje_edit.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c index d19a19aa0f..8426114719 100644 --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c | |||
@@ -3088,11 +3088,18 @@ _edje_edit_real_part_add(Evas_Object *obj, const char *name, Edje_Part_Type type | |||
3088 | rp->typedata.text = calloc(1, sizeof(Edje_Real_Part_Text)); | 3088 | rp->typedata.text = calloc(1, sizeof(Edje_Real_Part_Text)); |
3089 | rp->object = evas_object_textblock_add(ed->base->evas); | 3089 | rp->object = evas_object_textblock_add(ed->base->evas); |
3090 | } | 3090 | } |
3091 | else if (ep->type == EDJE_PART_TYPE_BOX || | 3091 | else if (ep->type == EDJE_PART_TYPE_BOX) |
3092 | ep->type == EDJE_PART_TYPE_TABLE) | ||
3093 | { | 3092 | { |
3094 | rp->type = EDJE_RP_TYPE_CONTAINER; | 3093 | rp->type = EDJE_RP_TYPE_CONTAINER; |
3095 | rp->typedata.container = calloc(1, sizeof(Edje_Real_Part_Container)); | 3094 | rp->typedata.container = calloc(1, sizeof(Edje_Real_Part_Container)); |
3095 | rp->object = evas_object_box_add(ed->base->evas); | ||
3096 | rp->typedata.container->anim = _edje_box_layout_anim_new(rp->object); | ||
3097 | } | ||
3098 | else if (ep->type == EDJE_PART_TYPE_TABLE) | ||
3099 | { | ||
3100 | rp->type = EDJE_RP_TYPE_CONTAINER; | ||
3101 | rp->typedata.container = calloc(1, sizeof(Edje_Real_Part_Container)); | ||
3102 | rp->object = evas_object_table_add(ed->base->evas); | ||
3096 | } | 3103 | } |
3097 | else if (ep->type != EDJE_PART_TYPE_SPACER) | 3104 | else if (ep->type != EDJE_PART_TYPE_SPACER) |
3098 | ERR("wrong part type %i!", ep->type); | 3105 | ERR("wrong part type %i!", ep->type); |