diff options
author | Vyacheslav Reutskiy <v.reutskiy@samsung.com> | 2013-11-04 15:39:44 +0900 |
---|---|---|
committer | Cedric Bail <cedric.bail@samsung.com> | 2013-11-04 15:39:51 +0900 |
commit | c2c416fdf77017f49aa31a9744aeda9b114e7e61 (patch) | |
tree | c4d91998f009275f76399c9e87dcfcc6561d61be /src/lib/edje/edje_edit.c | |
parent | 6853dbcf23f71038a14fb4e44c0011dbb475821c (diff) |
edje: edje_edit api - fixed seg fault in the edje_edit_part_del
Reviewers: cedric, seoz
Reviewed By: cedric
Differential Revision: https://phab.enlightenment.org/D315
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
Diffstat (limited to '')
-rw-r--r-- | src/lib/edje/edje_edit.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c index be6972d43f..cfd97bdff3 100644 --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c | |||
@@ -315,7 +315,7 @@ _edje_real_part_free(Edje *ed, Edje_Real_Part *rp) | |||
315 | evas_object_del(rp->object); | 315 | evas_object_del(rp->object); |
316 | } | 316 | } |
317 | 317 | ||
318 | if (rp->typedata.swallow->swallowed_object) | 318 | if ((rp->typedata.swallow) && (rp->typedata.swallow->swallowed_object)) |
319 | { | 319 | { |
320 | evas_object_smart_member_del(rp->typedata.swallow->swallowed_object); | 320 | evas_object_smart_member_del(rp->typedata.swallow->swallowed_object); |
321 | evas_object_event_callback_del(rp->typedata.swallow->swallowed_object, | 321 | evas_object_event_callback_del(rp->typedata.swallow->swallowed_object, |
@@ -333,10 +333,10 @@ _edje_real_part_free(Edje *ed, Edje_Real_Part *rp) | |||
333 | rp->typedata.swallow->swallowed_object = NULL; | 333 | rp->typedata.swallow->swallowed_object = NULL; |
334 | } | 334 | } |
335 | 335 | ||
336 | if (rp->typedata.text->text) eina_stringshare_del(rp->typedata.text->text); | 336 | if ((rp->typedata.text) && (rp->typedata.text->text)) eina_stringshare_del(rp->typedata.text->text); |
337 | if (rp->typedata.text->font) eina_stringshare_del(rp->typedata.text->font); | 337 | if ((rp->typedata.text) && (rp->typedata.text->font)) eina_stringshare_del(rp->typedata.text->font); |
338 | if (rp->typedata.text->cache.in_str) eina_stringshare_del(rp->typedata.text->cache.in_str); | 338 | if ((rp->typedata.text) && (rp->typedata.text->cache.in_str)) eina_stringshare_del(rp->typedata.text->cache.in_str); |
339 | if (rp->typedata.text->cache.out_str) eina_stringshare_del(rp->typedata.text->cache.out_str); | 339 | if ((rp->typedata.text) && (rp->typedata.text->cache.out_str)) eina_stringshare_del(rp->typedata.text->cache.out_str); |
340 | 340 | ||
341 | if (rp->custom) | 341 | if (rp->custom) |
342 | { | 342 | { |
@@ -2092,8 +2092,10 @@ edje_edit_part_del(Evas_Object *obj, const char* part) | |||
2092 | if (i == id) continue; //don't check the deleted id | 2092 | if (i == id) continue; //don't check the deleted id |
2093 | real = ed->table_parts[i]; | 2093 | real = ed->table_parts[i]; |
2094 | 2094 | ||
2095 | if (real->typedata.text->source == rp) real->typedata.text->source = NULL; | 2095 | if ((real->typedata.text) && (real->typedata.text->source == rp)) |
2096 | if (real->typedata.text->text_source == rp) real->typedata.text->text_source = NULL; | 2096 | real->typedata.text->source = NULL; |
2097 | if ((real->typedata.text) && (real->typedata.text->text_source == rp)) | ||
2098 | real->typedata.text->text_source = NULL; | ||
2097 | 2099 | ||
2098 | if (real->part->clip_to_id == rp->part->id) | 2100 | if (real->part->clip_to_id == rp->part->id) |
2099 | { | 2101 | { |