mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-16 03:23:15 +01:00
Guard against passing NULL to qsort()
This commit is contained in:
@@ -695,6 +695,9 @@ static int server_compare(const void *a, const void *b)
|
||||
|
||||
static void sort_servers()
|
||||
{
|
||||
if (_serverEntries == NULL) {
|
||||
return;
|
||||
}
|
||||
qsort(_serverEntries, _numServerEntries, sizeof(server_entry), server_compare);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user