Disconnect from signals if the pan_obj goes away.

IF we're replacing the pan_obj, then we should disconnect from the old
in order to avoid receive useless callbacks... actually if it is an
external pan object and we die and it does not, we may end crashing
due it calling function callbacks with garbage data.



SVN revision: 52117
This commit is contained in:
Gustavo Sverzut Barbieri 2010-09-10 02:01:32 +00:00
parent 5e7dfe1c8c
commit b5aeff5519
1 changed files with 7 additions and 0 deletions

View File

@ -196,6 +196,13 @@ elm_smart_scroller_extern_pan_set(Evas_Object *obj, Evas_Object *pan,
API_ENTRY return;
elm_smart_scroller_child_set(obj, NULL);
if (sd->pan_obj)
{
evas_object_smart_callback_del(sd->pan_obj, "changed", _smart_pan_changed_hook);
evas_object_smart_callback_del(sd->pan_obj, "pan_changed", _smart_pan_pan_changed_hook);
}
if (sd->extern_pan)
{
if (sd->pan_obj)