mirror of https://github.com/OpenRCT2/OpenRCT2.git
Guard against passing NULL to qsort()
This commit is contained in:
parent
84dc29b929
commit
f6daea7cef
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue