diff --git a/ChangeLog b/ChangeLog index c6275c14b4..66c6fbbae0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-03-04 Michael Natterer + + * app/core/gimpobject.c (gimp_object_get_memsize): don't pass + random strings to g_print() without running them through %s. + Fixes crash/warning when the string contains '%'. + 2007-03-04 Hans Breuer * **/makefile.msc app/gimpcore.def : updated diff --git a/app/core/gimpobject.c b/app/core/gimpobject.c index 3c564fbee4..d36bbd656d 100644 --- a/app/core/gimpobject.c +++ b/app/core/gimpobject.c @@ -430,10 +430,15 @@ gimp_object_get_memsize (GimpObject *object, if (indent_level == 0) { - g_list_foreach (aggregation_tree, (GFunc) g_print, NULL); - g_list_foreach (aggregation_tree, (GFunc) g_free, NULL); - g_list_free (aggregation_tree); + GList *list; + for (list = aggregation_tree; list; list = g_list_next (list)) + { + g_print ("%s", (gchar *) list->data); + g_free (list->data); + } + + g_list_free (aggregation_tree); aggregation_tree = NULL; }