mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-01-03 18:05:34 +00:00
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:
parent
c3a3f18076
commit
f1bc5f305c
|
@ -30,6 +30,9 @@
|
||||||
#if defined(HAVE_QSORT)
|
#if defined(HAVE_QSORT)
|
||||||
void SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *))
|
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);
|
qsort(base, nmemb, size, compare);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue