summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunsuChoi <jsuya.choi@samsung.com>2020-03-24 21:08:17 +0900
committerHermet Park <chuneon.park@samsung.com>2020-03-24 21:08:17 +0900
commita8b15a1d13d0df2df4d7c40d8877b9cbfc65e4a2 (patch)
treee79bbab506d13c662494c13694a1ccb01fda4183
parent6f95a42f602e5f0abb81dd42b7b7b3cfbdcf2336 (diff)
elm_transit: Prevent adding duplicates
Summary: When repeating call elm_transit_object_add, prevent the object from being added duplicates. Test Plan: N/A Reviewers: Hermet, herb, kimcinoo Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11563
-rw-r--r--src/lib/elementary/elm_transit.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_transit.c b/src/lib/elementary/elm_transit.c
index 14785eaa62..a7b829c6dc 100644
--- a/src/lib/elementary/elm_transit.c
+++ b/src/lib/elementary/elm_transit.c
@@ -652,6 +652,13 @@ elm_transit_object_add(Elm_Transit *transit, Evas_Object *obj)
652 ELM_TRANSIT_CHECK_OR_RETURN(transit); 652 ELM_TRANSIT_CHECK_OR_RETURN(transit);
653 EINA_SAFETY_ON_NULL_RETURN(obj); 653 EINA_SAFETY_ON_NULL_RETURN(obj);
654 654
655 // Prevent adding duplicates
656 if (eina_list_data_find_list(transit->objs, obj))
657 {
658 WRN("Object(%p) is already added", obj);
659 return;
660 }
661
655 if (transit->animator) 662 if (transit->animator)
656 { 663 {
657 if (!evas_object_data_get(obj, _transit_key)) 664 if (!evas_object_data_get(obj, _transit_key))