1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-11 13:50:48 -05:00

[DRun] Fix sorting when name is NULL.

Thanks to nick87720z
This commit is contained in:
Dave Davenport 2021-05-23 00:31:38 +02:00 committed by Dave Davenport
parent 2c9e20b022
commit 6c315a55c2

View file

@ -712,6 +712,13 @@ static gint drun_int_sort_list ( gconstpointer a, gconstpointer b, G_GNUC_UNUSED
DRunModeEntry *db = (DRunModeEntry *) b;
if ( da->sort_index < 0 && db->sort_index < 0 ) {
if ( da->name == NULL && db->name == NULL ) {
return 0;
} else if ( da->name == NULL ) {
return -1;
} else if ( db->name == NULL ) {
return 1;
}
return g_utf8_collate ( da->name, db->name );
}
else {