From dbe9a4649a2f43e0f2dc705f8dfa4eb0b2140c2a Mon Sep 17 00:00:00 2001 From: Federico Cecchetto Date: Thu, 2 Jun 2022 01:30:51 +0200 Subject: [PATCH] Fix crash --- src/client/game/game.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/client/game/game.cpp b/src/client/game/game.cpp index 2905d7c9..f75f7a70 100644 --- a/src/client/game/game.cpp +++ b/src/client/game/game.cpp @@ -38,7 +38,8 @@ namespace game void SV_GameSendServerCommand(int client_num, svscmd_type type, const char* text) { - if (*mp::svs_clients == nullptr) + const auto svs_clients = *mp::svs_clients; + if (svs_clients == nullptr) { return; } @@ -49,7 +50,7 @@ namespace game } else { - SV_SendServerCommand(mp::svs_clients[client_num], type, "%s", text); + SV_SendServerCommand(&svs_clients[client_num], type, "%s", text); } }