forked from enlightenment/efl
Eo add: beef up error reporting.
In some cases object ceration would fail without an error, this is bad and should not happen. Thanks to cedric for reporting.
This commit is contained in:
parent
d85d9672b5
commit
40cb2cd3d4
|
@ -933,7 +933,10 @@ _eo_add_internal_end(Eo *eo_id)
|
|||
}
|
||||
|
||||
if (EINA_UNLIKELY(!fptr->o.obj))
|
||||
return NULL;
|
||||
{
|
||||
ERR("Corrupt call stuck, shouldn't happen, please report!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!fptr->o.obj->condtor_done || fptr->o.obj->do_error)
|
||||
{
|
||||
|
|
|
@ -11,29 +11,45 @@
|
|||
#define EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, ret) \
|
||||
_Eo_Object *obj; \
|
||||
do { \
|
||||
if (!obj_id) return ret; \
|
||||
obj = _eo_obj_pointer_get((Eo_Id)obj_id); \
|
||||
if (!obj) return ret; \
|
||||
if (!obj) { \
|
||||
ERR("Obj (%p) is an invalid ref.", obj_id); \
|
||||
return ret; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define EO_OBJ_POINTER_RETURN(obj_id, obj) \
|
||||
_Eo_Object *obj; \
|
||||
do { \
|
||||
if (!obj_id) return; \
|
||||
obj = _eo_obj_pointer_get((Eo_Id)obj_id); \
|
||||
if (!obj) return; \
|
||||
if (!obj) { \
|
||||
ERR("Obj (%p) is an invalid ref.", obj_id); \
|
||||
return; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define EO_CLASS_POINTER_RETURN_VAL(klass_id, klass, ret) \
|
||||
_Eo_Class *klass; \
|
||||
do { \
|
||||
if (!klass_id) return ret; \
|
||||
klass = _eo_class_pointer_get(klass_id); \
|
||||
if (!klass) return ret; \
|
||||
if (!klass) { \
|
||||
ERR("Klass (%p) is an invalid ref.", klass_id); \
|
||||
return ret; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define EO_CLASS_POINTER_RETURN(klass_id, klass) \
|
||||
_Eo_Class *klass; \
|
||||
do { \
|
||||
if (!klass_id) return; \
|
||||
klass = _eo_class_pointer_get(klass_id); \
|
||||
if (!klass) return; \
|
||||
if (!klass) { \
|
||||
ERR("Klass (%p) is an invalid ref.", klass_id); \
|
||||
return; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue