[mutter/cherry-pick-4270eef1: 2/2] actor: Fix logic error in determining terminal effect for paint volume



commit 02e80af20034bf50a13f1a307f3c23a068138965
Author: Sam Spilsbury <sam endlessm com>
Date:   Wed Aug 29 00:27:16 2018 +0000

    actor: Fix logic error in determining terminal effect for paint volume
    
    Previously we were checking l->data != NULL || (l->data != NULL &&
    l->data != priv->current_effect). This would continue the loop even
    if l->data == priv->current_effect, since l->data != NULL, which was
    not the intention of that loop.
    
    We also don't need to check that l->data != NULL before checking if
    it does not match the current_effect, since we already checked
    that current_effect was non-NULL before entering the loop.
    
    
    (cherry picked from commit 4270eef16ecbc5447c9869596567f2866c9265d7)

 clutter/clutter/clutter-actor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index 34baefd7f..8e160067e 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -17485,7 +17485,7 @@ _clutter_actor_get_paint_volume_real (ClutterActor *self,
            */
           effects = _clutter_meta_group_peek_metas (priv->effects);
           for (l = effects;
-               l != NULL || (l != NULL && l->data != priv->current_effect);
+               l != NULL && l->data != priv->current_effect;
                l = l->next)
             {
               if (!_clutter_effect_get_paint_volume (l->data, pv))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]