Fix GPtrArray sorting function

GPtrArray's GCompareFunc passes a double pointer that needs to be
dereferenced in order to use the data you are actually wanting to
compare.

See: https://developer.gnome.org/glib/stable/glib-Pointer-Arrays.html#g-ptr-array-sort
This commit is contained in:
Tristan Partin 2020-05-29 15:24:09 -05:00
parent e930c7ef64
commit 6a507c0b63
No known key found for this signature in database
GPG Key ID: 5AD0476101F9899D

View File

@ -1228,8 +1228,8 @@ static gint
gtk_tool_palette_compare_groups (gconstpointer a,
gconstpointer b)
{
const GtkToolItemGroupInfo *group_a = a;
const GtkToolItemGroupInfo *group_b = b;
const GtkToolItemGroupInfo *group_a = *((GtkToolItemGroupInfo **) a);
const GtkToolItemGroupInfo *group_b = *((GtkToolItemGroupInfo **) b);
return group_a->pos - group_b->pos;
}