summaryrefslogtreecommitdiff
path: root/efl
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2016-01-18 21:24:26 +0100
committerDave Andreoli <dave@gurumeditation.it>2016-01-18 21:24:26 +0100
commitfc68b43317fdacaeb02d5785fe1fb2c31b499d40 (patch)
tree3796c475dfcfb1baebd4affb5c487ca93b6c7753 /efl
parent458121f6be1c6b9b911c8f65fdc728ecc623e71d (diff)
ecore_con.Url: do not fail when receiving an event that is not for us.
The url callbacks are called for EVERY ecore_con usage, object_from_instance can fail in case the Url is not generated from us (for example an elm Image that load the data from the net). So just ignore those events.
Diffstat (limited to 'efl')
-rw-r--r--efl/ecore_con/efl.ecore_con.pyx8
1 files changed, 7 insertions, 1 deletions
diff --git a/efl/ecore_con/efl.ecore_con.pyx b/efl/ecore_con/efl.ecore_con.pyx
index 2d2f094..af14c88 100644
--- a/efl/ecore_con/efl.ecore_con.pyx
+++ b/efl/ecore_con/efl.ecore_con.pyx
@@ -227,7 +227,13 @@ cdef Eina_Bool _con_event_filter_cb(void *data, int ev_type, void *ev) with gil:
227 event_cls = _event_mapping_get(ev_type) 227 event_cls = _event_mapping_get(ev_type)
228 if event_cls: 228 if event_cls:
229 py_event = event_cls() 229 py_event = event_cls()
230 py_event._set_obj(ev) 230
231 # object_from_instance can fail in _set_obj if the event is
232 # generated from an object not managed by us, so just ignore it.
233 try:
234 py_event._set_obj(ev)
235 except:
236 return 1
231 237
232 # do we have callbacks for this object/event ? 238 # do we have callbacks for this object/event ?
233 try: 239 try: