eo: Fix internal reference count wrongly 0 when constructor returns a different object

The class's Eo constructor can return a different object, which makes
the efl_add return that object instead. However, a bug was not
initializing the internal reference count when a different object was
returned.
This commit is contained in:
Felipe Magno de Almeida 2018-06-18 14:49:43 -03:00
parent 0d91088d0f
commit 4a60c60528
1 changed files with 1 additions and 0 deletions

View File

@ -927,6 +927,7 @@ ok_nomatch_back:
ok_nomatch:
{
EO_OBJ_POINTER_GOTO_PROXY(eo_id, new_obj, err_newid);
_efl_ref(new_obj);
efl_ref(eo_id);
/* We might have two refs on the old object at this point. */
efl_parent_set((Eo *) obj->header.id, NULL);