summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2011-10-25 12:30:39 +0000
committerCarsten Haitzler <raster@rasterman.com>2011-10-25 12:30:39 +0000
commitba1d2ac288c5620917baafd8a38668e725fd060d (patch)
tree3333cb02917c0cea96b763a6090d6d5188fdb9ad /legacy
parent1a1aaa8b94bf955142fe60bffa142b9ede5a4225 (diff)
make elm widget a bit more paranoid/safe
SVN revision: 64392
Diffstat (limited to 'legacy')
-rw-r--r--legacy/elementary/src/lib/elm_widget.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/legacy/elementary/src/lib/elm_widget.c b/legacy/elementary/src/lib/elm_widget.c
index c317af9d43..f18c3aa710 100644
--- a/legacy/elementary/src/lib/elm_widget.c
+++ b/legacy/elementary/src/lib/elm_widget.c
@@ -3404,6 +3404,7 @@ _smart_del(Evas_Object *obj)
3404 evas_object_event_callback_del_full(sobj, EVAS_CALLBACK_DEL, _sub_obj_del, sd); 3404 evas_object_event_callback_del_full(sobj, EVAS_CALLBACK_DEL, _sub_obj_del, sd);
3405 evas_object_smart_callback_call(sd->obj, "sub-object-del", sobj); 3405 evas_object_smart_callback_call(sd->obj, "sub-object-del", sobj);
3406 evas_object_del(sobj); 3406 evas_object_del(sobj);
3407 sd->resize_obj = NULL;
3407 } 3408 }
3408 if (sd->hover_obj) 3409 if (sd->hover_obj)
3409 { 3410 {
@@ -3412,6 +3413,7 @@ _smart_del(Evas_Object *obj)
3412 evas_object_event_callback_del_full(sobj, EVAS_CALLBACK_DEL, _sub_obj_del, sd); 3413 evas_object_event_callback_del_full(sobj, EVAS_CALLBACK_DEL, _sub_obj_del, sd);
3413 evas_object_smart_callback_call(sd->obj, "sub-object-del", sobj); 3414 evas_object_smart_callback_call(sd->obj, "sub-object-del", sobj);
3414 evas_object_del(sobj); 3415 evas_object_del(sobj);
3416 sd->hover_obj = NULL;
3415 } 3417 }
3416 EINA_LIST_FREE(sd->subobjs, sobj) 3418 EINA_LIST_FREE(sd->subobjs, sobj)
3417 { 3419 {
@@ -3419,8 +3421,8 @@ _smart_del(Evas_Object *obj)
3419 evas_object_smart_callback_call(sd->obj, "sub-object-del", sobj); 3421 evas_object_smart_callback_call(sd->obj, "sub-object-del", sobj);
3420 evas_object_del(sobj); 3422 evas_object_del(sobj);
3421 } 3423 }
3422 eina_list_free(sd->tooltips); /* should be empty anyway */ 3424 sd->tooltips = eina_list_free(sd->tooltips); /* should be empty anyway */
3423 eina_list_free(sd->cursors); /* should be empty anyway */ 3425 sd->cursors = eina_list_free(sd->cursors); /* should be empty anyway */
3424 EINA_LIST_FREE(sd->edje_signals, esd) 3426 EINA_LIST_FREE(sd->edje_signals, esd)
3425 { 3427 {
3426 eina_stringshare_del(esd->emission); 3428 eina_stringshare_del(esd->emission);
@@ -3434,14 +3436,16 @@ _smart_del(Evas_Object *obj)
3434 eina_stringshare_del(ts->string); 3436 eina_stringshare_del(ts->string);
3435 free(ts); 3437 free(ts);
3436 } 3438 }
3437 eina_list_free(sd->event_cb); /* should be empty anyway */ 3439 sd->event_cb = eina_list_free(sd->event_cb); /* should be empty anyway */
3438 if (sd->del_func) sd->del_func(obj); 3440 if (sd->del_func) sd->del_func(obj);
3439 if (sd->style) eina_stringshare_del(sd->style); 3441 if (sd->style) eina_stringshare_del(sd->style);
3440 if (sd->type) eina_stringshare_del(sd->type); 3442 if (sd->type) eina_stringshare_del(sd->type);
3441 if (sd->theme) elm_theme_free(sd->theme); 3443 if (sd->theme) elm_theme_free(sd->theme);
3444 sd->data = NULL;
3442 _if_focused_revert(obj, EINA_TRUE); 3445 _if_focused_revert(obj, EINA_TRUE);
3443 if (sd->access_info) eina_stringshare_del(sd->access_info); 3446 if (sd->access_info) eina_stringshare_del(sd->access_info);
3444 free(sd); 3447 free(sd);
3448 evas_object_smart_data_set(obj, NULL);
3445} 3449}
3446 3450
3447static void 3451static void