Skip to content
Snippets Groups Projects
Commit 558e6b78 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

filesystem: avoid potential qsort(NULL)

parent 9fea6f98
No related branches found
No related tags found
No related merge requests found
......@@ -153,7 +153,7 @@ int vlc_loaddir( DIR *dir, char ***namelist,
num++;
}
if (compar != NULL)
if (compar != NULL && num > 0)
qsort (tab, num, sizeof (*tab),
(int (*)( const void *, const void *))compar);
*namelist = tab;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment