[gtk+/gtk-3-18] Fix gtk_style_context_list_classes



commit b9d45919494dabdd05bc3b96d92a01d2bb39ed05
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Oct 3 17:37:34 2015 -0400

    Fix gtk_style_context_list_classes
    
    The function was always returning NULL.

 gtk/gtkstylecontext.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 9a5587d..9176c02 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -1402,9 +1402,9 @@ gtk_style_context_list_classes (GtkStyleContext *context)
   
   classes = gtk_css_node_list_classes (priv->cssnode, &n_classes);
 
-  for (i = n_classes; i-- > n_classes;)
+  for (i = n_classes; i > 0; i--)
     {
-      quark_str = g_quark_to_string (classes[i]);
+      quark_str = g_quark_to_string (classes[i - 1]);
       classes_list = g_list_prepend (classes_list, (gchar *) quark_str);
     }
 


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