summaryrefslogtreecommitdiff
path: root/src/lib/edje
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-09-19 12:07:13 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-09-19 12:11:13 +0900
commit1a3e8ee6d083e186732b7d08260edb8dbd9a8672 (patch)
tree084bf4dbbb0ad4e8c564587634d15a5ae37e5baa /src/lib/edje
parent1f447f3a875e9dad5c201145c682112686db9a18 (diff)
edje: Fix invalid storage of efl_part objects
Test scenario: - elementary_test -to "ExtProgressBar" - Then click on "... from C Fixes T6032 @fix
Diffstat (limited to 'src/lib/edje')
-rw-r--r--src/lib/edje/edje_part_helper.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/lib/edje/edje_part_helper.h b/src/lib/edje/edje_part_helper.h
index 8cb3fa86ec..3bea35fc45 100644
--- a/src/lib/edje/edje_part_helper.h
+++ b/src/lib/edje/edje_part_helper.h
@@ -99,31 +99,35 @@ Eo * \
99_edje_ ## type ## _internal_proxy_get(Edje_Object *obj EINA_UNUSED, Edje *ed, Edje_Real_Part *rp) \ 99_edje_ ## type ## _internal_proxy_get(Edje_Object *obj EINA_UNUSED, Edje *ed, Edje_Real_Part *rp) \
100{ \ 100{ \
101 Efl_Canvas_Layout_Part_Data *pd; \ 101 Efl_Canvas_Layout_Part_Data *pd; \
102 Eo *proxy; \ 102 Eo *proxy = PROXY_STATIC_VAR(type); \
103 \ 103 \
104 pd = PROXY_STATIC_VAR(type) ? efl_data_scope_get(PROXY_STATIC_VAR(type), EFL_CANVAS_LAYOUT_PART_CLASS) : NULL; \ 104 pd = proxy ? efl_data_scope_get(proxy, EFL_CANVAS_LAYOUT_PART_CLASS) : NULL; \
105 if (!pd) \ 105 if (!pd) \
106 { \ 106 { \
107 if (PROXY_STATIC_VAR(type)) \ 107 if (EINA_UNLIKELY(PROXY_STATIC_VAR(type) != NULL)) \
108 ERR("Found invalid handle for efl_part. Reset."); \ 108 ERR("Found invalid handle for efl_part. Reset."); \
109 PROXY_STATIC_VAR(type) = efl_add(KLASS, ed->obj, _edje_real_part_set(efl_added, ed, rp, rp->part->name)); \ 109 proxy = efl_add(KLASS, ed->obj, _edje_real_part_set(efl_added, ed, rp, rp->part->name)); \
110 goto end ; \ 110 goto end ; \
111 } \ 111 } \
112 \ 112 \
113 if (EINA_UNLIKELY(pd->in_use)) \ 113 if (EINA_UNLIKELY(pd->in_use)) \
114 { \ 114 { \
115 /* if (!pd->in_call) _part_reuse_error(pd); */ \ 115 /* if (!pd->in_call) _part_reuse_error(pd); */ \
116 PROXY_STATIC_VAR(type) = efl_add(KLASS, ed->obj, _edje_real_part_set(efl_added, ed, rp, rp->part->name)); \ 116 proxy = efl_add(KLASS, ed->obj, _edje_real_part_set(efl_added, ed, rp, rp->part->name)); \
117 } \ 117 } \
118 else \ 118 else \
119 { \ 119 { \
120 _edje_real_part_set(PROXY_STATIC_VAR(type), ed, rp, rp->part->name); \ 120 _edje_real_part_set(proxy, ed, rp, rp->part->name); \
121 } \ 121 } \
122 \ 122 \
123end: \ 123end: \
124 proxy = PROXY_STATIC_VAR(type); \ 124 \
125 __VA_ARGS__; \ 125 __VA_ARGS__; \
126 if (!no_del_cb) efl_del_intercept_set(proxy, _ ## type ## _del_cb); \ 126 if (!no_del_cb) \
127 { \
128 PROXY_STATIC_VAR(type) = proxy; \
129 efl_del_intercept_set(proxy, _ ## type ## _del_cb); \
130 } \
127 return proxy; \ 131 return proxy; \
128} 132}
129 133