clip: Return TRUE when the the effect index does not change
authorAlexandru Băluț <alexandru.balut@gmail.com>
Wed, 17 Apr 2019 21:51:13 +0000 (23:51 +0200)
committerThibault Saunier <tsaunier@gnome.org>
Wed, 17 Apr 2019 21:56:21 +0000 (21:56 +0000)
ges/ges-clip.c

index 3809b51..88f38bc 100644 (file)
@@ -1276,9 +1276,11 @@ ges_clip_set_top_effect_index (GESClip * clip, GESBaseEffect * effect,
 
   newindex = newindex + min_prio;
   /*  We don't change the priority */
-  if (current_prio == newindex ||
-      (G_UNLIKELY (GES_CLIP (GES_TIMELINE_ELEMENT_PARENT (track_element)) !=
-              clip)))
+  if (current_prio == newindex)
+    return TRUE;
+
+  if (G_UNLIKELY (GES_CLIP (GES_TIMELINE_ELEMENT_PARENT (track_element)) !=
+          clip))
     return FALSE;
 
   if (newindex > (clip->priv->nb_effects - 1 + min_prio)) {