forked from enlightenment/efl
Gesture Layer: fix crash during deletion.
if target object is deleted before GLayer is deleted, we get a crash from _event_history_clear. Setting target to NULL on delete, then testing it before reporting state takes care of this problem.
This commit is contained in:
parent
fab1a003fc
commit
13da4a3a80
|
@ -960,6 +960,8 @@ _target_del_cb(void *data,
|
||||||
void *event_info __UNUSED__)
|
void *event_info __UNUSED__)
|
||||||
{
|
{
|
||||||
_callbacks_unregister(data);
|
_callbacks_unregister(data);
|
||||||
|
ELM_GESTURE_LAYER_DATA_GET(data, sd);
|
||||||
|
sd->target = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1165,8 +1167,9 @@ _event_history_clear(Evas_Object *obj)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ /* Report ABORT to all gestures that still not finished */
|
{ /* Report ABORT to all gestures that still not finished */
|
||||||
_state_set(p, ELM_GESTURE_STATE_ABORT, sd->gesture[i]->info,
|
if (sd->target)
|
||||||
EINA_FALSE);
|
_state_set(p, ELM_GESTURE_STATE_ABORT,
|
||||||
|
sd->gesture[i]->info, EINA_FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue