forked from enlightenment/efl
Eobj: Fixed a possible bug with object deletion.
SVN revision: 70437
This commit is contained in:
parent
9d03a70fa2
commit
47161b869c
|
@ -1013,14 +1013,13 @@ eobj_ref(Eobj *obj)
|
||||||
static void
|
static void
|
||||||
_eobj_del_internal(Eobj *obj)
|
_eobj_del_internal(Eobj *obj)
|
||||||
{
|
{
|
||||||
|
if (obj->delete)
|
||||||
|
return;
|
||||||
/* We need that for the event callbacks that may ref/unref. */
|
/* We need that for the event callbacks that may ref/unref. */
|
||||||
obj->refcount++;
|
obj->refcount++;
|
||||||
|
|
||||||
if (!obj->delete)
|
eobj_event_callback_call(obj, EOBJ_EV_DEL, NULL);
|
||||||
{
|
obj->delete = EINA_TRUE;
|
||||||
eobj_event_callback_call(obj, EOBJ_EV_DEL, NULL);
|
|
||||||
obj->delete = EINA_TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
obj->refcount--;
|
obj->refcount--;
|
||||||
|
|
||||||
|
@ -1102,10 +1101,7 @@ eobj_del(Eobj *obj)
|
||||||
{
|
{
|
||||||
EOBJ_MAGIC_RETURN(obj, EOBJ_EINA_MAGIC);
|
EOBJ_MAGIC_RETURN(obj, EOBJ_EINA_MAGIC);
|
||||||
|
|
||||||
if (!obj->delete)
|
_eobj_del_internal(obj);
|
||||||
{
|
|
||||||
_eobj_del_internal(obj);
|
|
||||||
}
|
|
||||||
eobj_unref(obj);
|
eobj_unref(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue