X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Flocale-root.c;fp=src%2Flocale-root.c;h=8386e669c77426876d7ae71ee6c6875bf7de327d;hb=b955575d6e5b35341982c64ab9053c31b1e42a48;hp=ece4456f6b82b8fad2a68a7a7e8427c583a135ed;hpb=6cd94fad12ca4e038aac409e8e1cb9a332a80a39;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;