X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Flocale-root.c;h=8386e669c77426876d7ae71ee6c6875bf7de327d;hb=8bfb43a861ca4562f1e5928cf9992849909c3e3a;hp=ece4456f6b82b8fad2a68a7a7e8427c583a135ed;hpb=b192d4cc46d8bda166116432ee28042e95750052;p=src%2Fapp-framework-binder.git 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;