diff options
author | Yeongjong Lee <yj34.lee@samsung.com> | 2018-08-29 21:11:00 +0900 |
---|---|---|
committer | Hermet Park <hermetpark@gmail.com> | 2018-08-29 21:11:00 +0900 |
commit | e19292aa2b0a8098f3e6f5c63ba86e80f99df90b (patch) | |
tree | 0f39c9d713da0729869d4750ccd2478c5b724681 /src/lib/emotion/emotion_smart.c | |
parent | 37f1a46c4a23a19e8aeece005b506dd0727f6196 (diff) |
evas: call evas_find before safety check
Summary:
edje_edit_object_add
edje_object_add
emotion_object_add
evas_object_xxx_add
These APIs had allowed to set parent to EFL_CANVAS_OBJECT(Evas_Object) before
8bb11a17. we should call evas_find before safety check for backward compatibility.
Test Plan:
win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
1. `rect = evas_object_rectangle_add(evas_object_evas_get(win));`
2. `rect = evas_object_rectangle_add(win);`
Check that 1. and 2. works.
Reviewers: Hermet, zmike
Reviewed By: Hermet
Subscribers: cedric, #reviewers, CHAN, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6909
Diffstat (limited to '')
-rw-r--r-- | src/lib/emotion/emotion_smart.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c index 5f8f46e186..ac22a873b1 100644 --- a/src/lib/emotion/emotion_smart.c +++ b/src/lib/emotion/emotion_smart.c | |||
@@ -232,8 +232,9 @@ _clipper_position_size_update(Evas_Object *obj, int x, int y, int w, int h, int | |||
232 | EAPI Evas_Object * | 232 | EAPI Evas_Object * |
233 | emotion_object_add(Evas *evas) | 233 | emotion_object_add(Evas *evas) |
234 | { | 234 | { |
235 | evas = evas_find(evas); | ||
235 | EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(evas, EVAS_CANVAS_CLASS), NULL); | 236 | EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(evas, EVAS_CANVAS_CLASS), NULL); |
236 | return efl_add(MY_CLASS, evas_find(evas), efl_canvas_object_legacy_ctor(efl_added)); | 237 | return efl_add(MY_CLASS, evas, efl_canvas_object_legacy_ctor(efl_added)); |
237 | } | 238 | } |
238 | 239 | ||
239 | EOLIAN static Eo * | 240 | EOLIAN static Eo * |