Safer version of the parent hack
not all objects have a bindable parent, Timer fe have Loop as parent and we don't have bindings for Loop.
This commit is contained in:
parent
c2c09d4dc9
commit
7fd0f973ca
|
@ -258,7 +258,11 @@ cdef class Eo(object):
|
|||
|
||||
# from efl 1.18 eo.parent changed behaviour, objects are now reparented
|
||||
# when, fe, swallowed. This is the hack to keep the old behavior.
|
||||
self.internal_data["_legacy_parent"] = object_from_instance(eo_parent_get(obj))
|
||||
try:
|
||||
parent = object_from_instance(eo_parent_get(obj))
|
||||
except ValueError:
|
||||
parent = None
|
||||
self.internal_data["_legacy_parent"] = parent
|
||||
|
||||
return 1
|
||||
|
||||
|
|
Loading…
Reference in New Issue