summaryrefslogtreecommitdiff
path: root/src/lib/emotion
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/emotion
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/emotion')
-rw-r--r--src/lib/emotion/emotion_smart.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c
index d68b84b..5f8f46e 100644
--- a/src/lib/emotion/emotion_smart.c
+++ b/src/lib/emotion/emotion_smart.c
@@ -19,6 +19,8 @@
19#include "Emotion.h" 19#include "Emotion.h"
20#include "emotion_private.h" 20#include "emotion_private.h"
21 21
22#include "canvas/evas_canvas.eo.h"
23
22#ifdef _WIN32 24#ifdef _WIN32
23# define FMT_UCHAR "%c" 25# define FMT_UCHAR "%c"
24#else 26#else
@@ -230,6 +232,7 @@ _clipper_position_size_update(Evas_Object *obj, int x, int y, int w, int h, int
230EAPI Evas_Object * 232EAPI Evas_Object *
231emotion_object_add(Evas *evas) 233emotion_object_add(Evas *evas)
232{ 234{
235 EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(evas, EVAS_CANVAS_CLASS), NULL);
233 return efl_add(MY_CLASS, evas_find(evas), efl_canvas_object_legacy_ctor(efl_added)); 236 return efl_add(MY_CLASS, evas_find(evas), efl_canvas_object_legacy_ctor(efl_added));
234} 237}
235 238