kuuko pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=87e2e8f9a162391b04de4a401ac65c0c30a4b682
commit 87e2e8f9a162391b04de4a401ac65c0c30a4b682 Author: Kai Huuhko <kai.huu...@gmail.com> Date: Wed Oct 2 06:35:07 2013 +0300 Elementary: Add more failsafes to transit del_cb --- efl/elementary/transit.pyx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/efl/elementary/transit.pyx b/efl/elementary/transit.pyx index 3210d66..d87e5c2 100644 --- a/efl/elementary/transit.pyx +++ b/efl/elementary/transit.pyx @@ -164,6 +164,7 @@ ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL = enums.ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL ELM_TRANSIT_TWEEN_MODE_DECELERATE = enums.ELM_TRANSIT_TWEEN_MODE_DECELERATE ELM_TRANSIT_TWEEN_MODE_ACCELERATE = enums.ELM_TRANSIT_TWEEN_MODE_ACCELERATE +import traceback cdef void elm_transit_del_cb(void *data, Elm_Transit *transit) with gil: cdef: @@ -171,12 +172,19 @@ cdef void elm_transit_del_cb(void *data, Elm_Transit *transit) with gil: tuple args dict kwargs - if data != NULL: - trans = <Transit?>data - args = trans.del_cb_args - kwargs = trans.del_cb_kwargs + assert data != NULL, "Failed to call Transit del_cb because data is NULL" - trans.del_cb(trans, *args, **kwargs) + trans = <Transit?>data + args = trans.del_cb_args + kwargs = trans.del_cb_kwargs + + try: + trans.del_cb(trans, *args, **kwargs) + except: + traceback.print_exc() + + trans.obj = NULL + Py_DECREF(trans) cdef class Transit(object): --