1
0
Fork 0
mirror of https://gitlab.com/Mr_Goldberg/goldberg_emulator.git synced 2024-11-14 10:50:13 +01:00

Only call server request callback if not NULL.

This commit is contained in:
Mr_Goldberg 2019-05-26 13:46:43 -04:00
parent d07ffec5f3
commit 968cd6d601
No known key found for this signature in database
GPG key ID: 8597D87419DEF278

View file

@ -424,16 +424,18 @@ void Steam_Matchmaking_Servers::RunCallbacks()
if (r.cancelled || r.completed) continue;
int i = 0;
for (auto &g : r.gameservers_filtered) {
PRINT_DEBUG("REQUESTS server responded cb %p\n", r.id);
r.callbacks->ServerResponded(r.id, i);
++i;
}
if (r.callbacks) {
for (auto &g : r.gameservers_filtered) {
PRINT_DEBUG("REQUESTS server responded cb %p\n", r.id);
r.callbacks->ServerResponded(r.id, i);
++i;
}
if (i) {
r.callbacks->RefreshComplete(r.id, eServerResponded);
} else {
r.callbacks->RefreshComplete(r.id, eNoServersListedOnMasterServer);
if (i) {
r.callbacks->RefreshComplete(r.id, eServerResponded);
} else {
r.callbacks->RefreshComplete(r.id, eNoServersListedOnMasterServer);
}
}
}