[gnome-shell] Fix always-true condition



commit 01c0803a4a7199db42694e742e29130cc87ca3be
Author: Federico Mena Quintero <federico gnome org>
Date:   Mon Dec 2 08:02:32 2019 -0600

    Fix always-true condition
    
    CrCascadePrivate->sheets is a statically-sized array inside the
    struct; it can't be NULL.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/861#note_659216

 src/st/croco/cr-cascade.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/st/croco/cr-cascade.c b/src/st/croco/cr-cascade.c
index b8f8277168..8789288cc1 100644
--- a/src/st/croco/cr-cascade.c
+++ b/src/st/croco/cr-cascade.c
@@ -199,7 +199,7 @@ cr_cascade_destroy (CRCascade * a_this)
         if (PRIVATE (a_this)) {
                 gulong i = 0;
 
-                for (i = 0; PRIVATE (a_this)->sheets && i < NB_ORIGINS; i++) {
+                for (i = 0; i < NB_ORIGINS; i++) {
                         if (PRIVATE (a_this)->sheets[i]) {
                                 if (cr_stylesheet_unref
                                     (PRIVATE (a_this)->sheets[i])


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