aboutsummaryrefslogtreecommitdiffstats
path: root/src/locale-root.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/locale-root.c')
-rw-r--r--src/locale-root.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/locale-root.c b/src/locale-root.c
index ece4456f..8386e669 100644
--- a/src/locale-root.c
+++ b/src/locale-root.c
@@ -263,7 +263,8 @@ static int init_container(struct locale_container *container, int dirfd)
}
/* sort the folders */
- qsort(container->folders, container->count, sizeof *container->folders, compare_folders_for_qsort);
+ if (container->count)
+ qsort(container->folders, container->count, sizeof *container->folders, compare_folders_for_qsort);
/* build the parents links */
i = container->count;