Prevent asan warning on qsort():

'src/stdlib/SDL_qsort.c:27:5: runtime error: null pointer passed as argument 1, which is declared to never be null`

(cherry picked from commit 2cd583ee13ec4660d7fbe6e6d8293744d3343071)
This commit is contained in:
Sylvain 2024-01-20 06:42:00 +01:00
parent c3a3f18076
commit f1bc5f305c
No known key found for this signature in database
GPG key ID: 5F87E02E5BC0939E

View file

@ -30,6 +30,9 @@
#if defined(HAVE_QSORT)
void SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *))
{
if (!base) {
return;
}
qsort(base, nmemb, size, compare);
}