eo: handle NULL nicely in efl_replace.

This commit is contained in:
Cedric Bail 2018-04-06 14:42:58 -07:00 committed by Cedric BAIL
parent e22e433d38
commit 356e37564a
1 changed files with 1 additions and 1 deletions

View File

@ -2047,7 +2047,7 @@ static inline void
efl_replace(Eo **storage, Eo *new_obj)
{
if (!storage || *storage == new_obj) return;
efl_ref(new_obj);
if (new_obj) efl_ref(new_obj);
efl_unref(*storage);
*storage = new_obj;
}