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:
parent
0d91088d0f
commit
4a60c60528
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue