summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrii Kroitor <an.kroitor@samsung.com>2013-11-16 09:55:42 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-11-16 09:55:42 +0900
commita4c16c221efdf592404b397d3c472414794df01d (patch)
tree5e3e275effd2c4791b7f05d4761463d69d7be08f /src
parent03969c98227195cf8e475f606026a50f0d92c419 (diff)
edje_edit: fixed SEGFAULT in _edje_real_part_free
Reviewers: cedric, seoz, raster Reviewed By: raster CC: reutskiy.v.v, cedric Differential Revision: https://phab.enlightenment.org/D336
Diffstat (limited to 'src')
-rw-r--r--src/lib/edje/edje_edit.c51
1 files changed, 28 insertions, 23 deletions
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index c0584f2299..b97f03fcd2 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -311,39 +311,44 @@ _edje_real_part_free(Edje *ed, Edje_Real_Part *rp)
311 311
312 if (rp->object) 312 if (rp->object)
313 { 313 {
314 _edje_callbacks_del(rp->object, ed); 314 _edje_callbacks_del(rp->object, ed);
315 evas_object_del(rp->object); 315 evas_object_del(rp->object);
316 } 316 }
317 317
318 if ((rp->typedata.swallow) && (rp->typedata.swallow->swallowed_object)) 318 if ((rp->type == EDJE_RP_TYPE_SWALLOW) && (rp->typedata.swallow)
319 && (rp->typedata.swallow->swallowed_object))
319 { 320 {
320 evas_object_smart_member_del(rp->typedata.swallow->swallowed_object); 321 evas_object_smart_member_del(rp->typedata.swallow->swallowed_object);
321 evas_object_event_callback_del(rp->typedata.swallow->swallowed_object, 322 evas_object_event_callback_del(rp->typedata.swallow->swallowed_object,
322 EVAS_CALLBACK_FREE, 323 EVAS_CALLBACK_FREE, _edje_object_part_swallow_free_cb);
323 _edje_object_part_swallow_free_cb); 324 evas_object_clip_unset(rp->typedata.swallow->swallowed_object);
324 evas_object_clip_unset(rp->typedata.swallow->swallowed_object); 325 evas_object_data_del(rp->typedata.swallow->swallowed_object,
325 evas_object_data_del(rp->typedata.swallow->swallowed_object, "\377 edje.swallowing_part"); 326 "\377 edje.swallowing_part");
326 if (rp->part->mouse_events) 327 if (rp->part->mouse_events)
327 _edje_callbacks_del(rp->typedata.swallow->swallowed_object, ed); 328 _edje_callbacks_del(rp->typedata.swallow->swallowed_object, ed);
328 329
329 if (rp->part->type == EDJE_PART_TYPE_GROUP || 330 if (rp->part->type == EDJE_PART_TYPE_GROUP ||
330 rp->part->type == EDJE_PART_TYPE_EXTERNAL) 331 rp->part->type == EDJE_PART_TYPE_EXTERNAL)
331 evas_object_del(rp->typedata.swallow->swallowed_object); 332 evas_object_del(rp->typedata.swallow->swallowed_object);
332 333
333 rp->typedata.swallow->swallowed_object = NULL; 334 rp->typedata.swallow->swallowed_object = NULL;
334 } 335 }
335 336
336 if ((rp->typedata.text) && (rp->typedata.text->text)) eina_stringshare_del(rp->typedata.text->text); 337 if ((rp->type == EDJE_RP_TYPE_TEXT) && (rp->typedata.text) &&
337 if ((rp->typedata.text) && (rp->typedata.text->font)) eina_stringshare_del(rp->typedata.text->font); 338 (rp->typedata.text->text)) eina_stringshare_del(rp->typedata.text->text);
338 if ((rp->typedata.text) && (rp->typedata.text->cache.in_str)) eina_stringshare_del(rp->typedata.text->cache.in_str); 339 if ((rp->type == EDJE_RP_TYPE_TEXT) && (rp->typedata.text) &&
339 if ((rp->typedata.text) && (rp->typedata.text->cache.out_str)) eina_stringshare_del(rp->typedata.text->cache.out_str); 340 (rp->typedata.text->font)) eina_stringshare_del(rp->typedata.text->font);
341 if ((rp->type == EDJE_RP_TYPE_TEXT) && (rp->typedata.text) &&
342 (rp->typedata.text->cache.in_str)) eina_stringshare_del(rp->typedata.text->cache.in_str);
343 if ((rp->type == EDJE_RP_TYPE_TEXT) && (rp->typedata.text) &&
344 (rp->typedata.text->cache.out_str)) eina_stringshare_del(rp->typedata.text->cache.out_str);
340 345
341 if (rp->custom) 346 if (rp->custom)
342 { 347 {
343 _edje_collection_free_part_description_clean(rp->part->type, rp->custom->description, 0); 348 _edje_collection_free_part_description_clean(rp->part->type, rp->custom->description, 0);
344 if (rp->custom) free(rp->custom->set); 349 if (rp->custom) free(rp->custom->set);
345 eina_mempool_free(_edje_real_part_state_mp, rp->custom); 350 eina_mempool_free(_edje_real_part_state_mp, rp->custom);
346 rp->custom = NULL; 351 rp->custom = NULL;
347 } 352 }
348 353
349 free(rp->drag); 354 free(rp->drag);