Eobj: Fixed a bug in event_callback_del.
[profile/ivi/eobj.git] / lib / eobj.c
index 6e4d6ad..26552a8 100644 (file)
@@ -635,7 +635,7 @@ eobj_class_new(const Eobj_Class_Description *desc, const Eobj_Class *parent, ...
           }
 
 
-     /* Update the current offset. */
+        /* Update the current offset. */
         /* FIXME: Make sure this alignment is enough. */
         klass->data_offset = klass->parent->data_offset +
            klass->parent->desc->private_size +
@@ -1150,11 +1150,13 @@ eobj_event_callback_del(Eobj *obj, const Eobj_Event_Description *desc, Eobj_Even
              cb->delete_me = EINA_TRUE;
              _eobj_callbacks_clear(obj);
              ret = data;
-             goto end;
+             goto found;
           }
      }
 
-end:
+   return NULL;
+
+found:
    eobj_event_callback_call(obj, EOBJ_SIG_CALLBACK_DEL, desc);
    return ret;
 }
@@ -1175,11 +1177,13 @@ eobj_event_callback_del_full(Eobj *obj, const Eobj_Event_Description *desc, Eobj
              cb->delete_me = EINA_TRUE;
              _eobj_callbacks_clear(obj);
              ret = data;
-             goto end;
+             goto found;
           }
      }
 
-end:
+   return NULL;
+
+found:
    eobj_event_callback_call(obj, EOBJ_SIG_CALLBACK_DEL, desc);
    return ret;
 }