summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-02-05 19:35:45 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-02-07 17:33:18 +0900
commit28d469237b79ffea137ae0fc790aafda1882944f (patch)
tree600b0725cb92315de858c7ef1785de225c195fdc /src
parent8570b38dd16ac9930b6a5f925a6f38eff37f2e90 (diff)
Evas filters: Avoid adding multiple sources under the same name
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/canvas/evas_object_text.c7
-rw-r--r--src/lib/evas/filters/evas_filter_parser.c1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c
index a7bb4c61f3..7d9d7fea3e 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -2736,12 +2736,19 @@ _filter_source_set(Eo *eo_obj, void *_pd, va_list *list)
2736 pgm = o->cur.filter.chain; 2736 pgm = o->cur.filter.chain;
2737 if (!pgm) 2737 if (!pgm)
2738 { 2738 {
2739 Evas_Object *old;
2739 if (!proxy) return; 2740 if (!proxy) return;
2740 if (!o->cur.filter.sources) 2741 if (!o->cur.filter.sources)
2741 { 2742 {
2742 o->cur.filter.sources = eina_hash_string_small_new 2743 o->cur.filter.sources = eina_hash_string_small_new
2743 (EINA_FREE_CB(evas_object_unref)); 2744 (EINA_FREE_CB(evas_object_unref));
2744 } 2745 }
2746 else
2747 {
2748 old = eina_hash_find(o->cur.filter.sources, name);
2749 if (old == proxy) return;
2750 if (old) eina_hash_del(o->cur.filter.sources, name, old);
2751 }
2745 evas_object_ref(proxy); 2752 evas_object_ref(proxy);
2746 eina_hash_add(o->cur.filter.sources, name, proxy); 2753 eina_hash_add(o->cur.filter.sources, name, proxy);
2747 o->cur.filter.changed = EINA_TRUE; 2754 o->cur.filter.changed = EINA_TRUE;
diff --git a/src/lib/evas/filters/evas_filter_parser.c b/src/lib/evas/filters/evas_filter_parser.c
index 5c99384dac..d5c30c7862 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -1386,6 +1386,7 @@ evas_filter_program_source_set(Evas_Filter_Program *pgm,
1386 Evas_Object *old; 1386 Evas_Object *old;
1387 1387
1388 old = eina_hash_find(pgm->proxies, name); 1388 old = eina_hash_find(pgm->proxies, name);
1389 if (old == object) return;
1389 if (old) eina_hash_del(pgm->proxies, name, old); 1390 if (old) eina_hash_del(pgm->proxies, name, old);
1390 1391
1391 evas_object_ref(object); 1392 evas_object_ref(object);