summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWoochanlee <wc0917.lee@samsung.com>2020-12-24 11:47:03 +0900
committerHermet Park <chuneon.park@samsung.com>2020-12-24 11:47:04 +0900
commited0c46fa3b915554474cb9b832fb56fb07666e34 (patch)
tree3578e0b1cfe322e44f75b43444e8320b99b89fee
parent37cecd54139ec8b7c81c71f5fb1c6c07a60815cb (diff)
downloadefl-ed0c46fa3b915554474cb9b832fb56fb07666e34.tar.gz
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
-rw-r--r--src/lib/eo/eo_base_class.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index c062833188..546b5d3999 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -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)