edje entry: fix crash issue due to improper callback handling
authorYoungbok Shin <youngb.shin@samsung.com>
Tue, 29 Nov 2016 05:39:01 +0000 (14:39 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 2 Jan 2017 07:23:55 +0000 (16:23 +0900)
Summary:
If there were multiple elm_entry objects and some of them were deleted,
the callback function would cause crash problem.
The callback function only for specific data should be deleted when
a entry object is deleted.
@fix

Test Plan: N/A

Reviewers: raster, cedric, herdsman, woohyun, subodh6129

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4435

Change-Id: I3892f3bf506232640f53cacab649f748825d91e8

src/lib/edje/edje_entry.c

index 05474c6..0d8aec4 100644 (file)
@@ -3238,7 +3238,7 @@ _edje_entry_real_part_shutdown(Edje *ed, Edje_Real_Part *rp, Eina_Bool reuse_ic)
         en->pw_timer = NULL;
      }
 
-   evas_event_callback_del(ed->base->evas, EVAS_CALLBACK_CANVAS_VIEWPORT_RESIZE, _canvas_viewport_resize_cb);
+   evas_event_callback_del_full(ed->base->evas, EVAS_CALLBACK_CANVAS_VIEWPORT_RESIZE, _canvas_viewport_resize_cb, rp);
 
 #ifdef HAVE_ECORE_IMF
    if (rp->part->entry_mode >= EDJE_ENTRY_EDIT_MODE_EDITABLE)