From af394406f7497ef9835450cea7f1b329a762f64a Mon Sep 17 00:00:00 2001 From: Juan Pablo Ugarte Date: Thu, 27 Sep 2012 21:38:31 -0300 Subject: [PATCH] gtk_container_class_set_template() Clear list of classes with templates since this function in rare occacions can be called more than once. (Glade) --- gtk/gtkcontainer.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c index a89dd92a47..fa3379c379 100644 --- a/gtk/gtkcontainer.c +++ b/gtk/gtkcontainer.c @@ -1408,6 +1408,12 @@ gtk_container_class_set_template (GtkContainerClass *container_class, priv->tmpl = tmpl; priv->tmpl_type = tmpl_type; + if (priv->tmpl_classes) + { + g_slist_free (priv->tmpl_classes); + priv->tmpl_classes = NULL; + } + /* Collect an ordered list of class which have templates to build */ for (oclass = G_OBJECT_CLASS (container_class); GTK_IS_CONTAINER_CLASS (oclass);