Fix crash when attempting to sort an empty directory
I had taken care to not sort empty directories during dirlist_open(), but forgot that manual user actions can still cause dirlist_set_sort() to be called, which does not handle empty directories. Reported by Alex Wilson.
Этот коммит содержится в:
родитель
93583e645f
Коммит
2501fb1ad5
@ -371,6 +371,7 @@ void dirlist_set_sort(int col, int desc, int df) {
|
||||
dirlist_sort_df = df;
|
||||
|
||||
/* sort the list (excluding the parent, which is always on top) */
|
||||
if(head_real)
|
||||
head_real = dirlist_sort(head_real);
|
||||
if(dirlist_parent)
|
||||
dirlist_parent->next = head_real;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user