mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-25 14:09:10 +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`
This commit is contained in:
parent
5db543a66a
commit
2cd583ee13
1 changed files with 3 additions and 0 deletions
|
@ -24,6 +24,9 @@
|
|||
#ifdef 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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue