mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
stringsorter: Fix one case of collation handling
When not ignoring case, and not collating, we were returning sort keys that were already freed. Oops. Pointed out by clang.
This commit is contained in:
parent
8c1a041104
commit
9cbfbbdf39
@ -86,14 +86,20 @@ gtk_string_sorter_get_key (GtkExpression *expression,
|
||||
switch (collation)
|
||||
{
|
||||
case GTK_COLLATION_NONE:
|
||||
key = s;
|
||||
if (ignore_case)
|
||||
key = g_steal_pointer (&s);
|
||||
else
|
||||
key = g_strdup (s);
|
||||
break;
|
||||
|
||||
case GTK_COLLATION_UNICODE:
|
||||
key = g_utf8_collate_key (s, -1);
|
||||
break;
|
||||
|
||||
case GTK_COLLATION_FILENAME:
|
||||
key = g_utf8_collate_key_for_filename (s, -1);
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user