eo_base_class: Avoid useless memory alloc

Summary:
The pd->ext will be NULL when the target object on invalidate state or edje object or isolated object etc..

In above case, If data is NULL and ext is not needed, it seems there is no need to create a node.

Reviewers: raster, cedric, Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12206
This commit is contained in:
Woochanlee 2020-12-24 11:47:03 +09:00 committed by Hermet Park
parent 37cecd5413
commit ed0c46fa3b
1 changed files with 2 additions and 0 deletions

View File

@ -362,6 +362,8 @@ _key_generic_set(const Eo *obj, Efl_Object_Data *pd, const char *key, const void
}
}
}
else
if (!data) return NULL;
ext = _efl_object_extension_need(pd);
if (ext)