summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_object_table.c
diff options
context:
space:
mode:
authorYeongjong Lee <cleanlyj@naver.com>2018-08-16 13:01:26 -0400
committerMike Blumenkrantz <zmike@samsung.com>2018-08-16 13:01:39 -0400
commit8bb11a172bfaac94b317f90004879356672e1571 (patch)
treee34b83327a81eaa63ed4ab9539ee43a2fa4fcfdc /src/lib/evas/canvas/evas_object_table.c
parent633d16aae7d288e615cdf4586043a9d2cc409f66 (diff)
evas: check evas class instead of using evas_find
Summary: A object that is not evas class shouldn't use evas_find. it may occurs segfault. ref c2e8b492b18bdecc2300ad051ba1406e40ad068f Test Plan: Evas *evas = evas_new(); evas_free(evas); evas_object_line_add(evas); Check weather there is segfault. Reviewers: Hermet, raster, zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6816
Diffstat (limited to 'src/lib/evas/canvas/evas_object_table.c')
-rw-r--r--src/lib/evas/canvas/evas_object_table.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/evas/canvas/evas_object_table.c b/src/lib/evas/canvas/evas_object_table.c
index 97ba008266..3b8837f6cc 100644
--- a/src/lib/evas/canvas/evas_object_table.c
+++ b/src/lib/evas/canvas/evas_object_table.c
@@ -979,9 +979,7 @@ _evas_table_efl_canvas_group_group_calculate(Eo *o, Evas_Table_Data *priv)
979EAPI Evas_Object * 979EAPI Evas_Object *
980evas_object_table_add(Evas *evas) 980evas_object_table_add(Evas *evas)
981{ 981{
982 MAGIC_CHECK(evas, Evas, MAGIC_EVAS); 982 EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(evas, EVAS_CANVAS_CLASS), NULL);
983 return NULL;
984 MAGIC_CHECK_END();
985 return efl_add(MY_CLASS, evas_find(evas), efl_canvas_object_legacy_ctor(efl_added)); 983 return efl_add(MY_CLASS, evas_find(evas), efl_canvas_object_legacy_ctor(efl_added));
986} 984}
987 985