summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_object_line.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_line.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_line.c')
-rw-r--r--src/lib/evas/canvas/evas_object_line.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/evas/canvas/evas_object_line.c b/src/lib/evas/canvas/evas_object_line.c
index e26ea6677b..f506f758cb 100644
--- a/src/lib/evas/canvas/evas_object_line.c
+++ b/src/lib/evas/canvas/evas_object_line.c
@@ -94,9 +94,7 @@ static const Evas_Object_Func object_func =
94EAPI Evas_Object * 94EAPI Evas_Object *
95evas_object_line_add(Evas *e) 95evas_object_line_add(Evas *e)
96{ 96{
97 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 97 EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(e, EVAS_CANVAS_CLASS), NULL);
98 return NULL;
99 MAGIC_CHECK_END();
100 return efl_add(EVAS_LINE_CLASS, evas_find(e), efl_canvas_object_legacy_ctor(efl_added)); 98 return efl_add(EVAS_LINE_CLASS, evas_find(e), efl_canvas_object_legacy_ctor(efl_added));
101} 99}
102 100