From 731c487ccb92830b5431a8a8529b6be7f3fee224 Mon Sep 17 00:00:00 2001 From: RickyRister <42636155+RickyRister@users.noreply.github.com> Date: Sun, 4 Jan 2026 22:43:40 -0800 Subject: [PATCH] [ServerGame] null check participant in getPlayer (#6493) --- .../libcockatrice/network/server/remote/game/server_game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcockatrice_network/libcockatrice/network/server/remote/game/server_game.cpp b/libcockatrice_network/libcockatrice/network/server/remote/game/server_game.cpp index d8574db99..c04876696 100644 --- a/libcockatrice_network/libcockatrice/network/server/remote/game/server_game.cpp +++ b/libcockatrice_network/libcockatrice/network/server/remote/game/server_game.cpp @@ -232,7 +232,7 @@ QMap Server_Game::getPlayers() const // copies poi Server_AbstractPlayer *Server_Game::getPlayer(int id) const { auto *participant = participants.value(id); - if (!participant->isSpectator()) { + if (participant && !participant->isSpectator()) { return static_cast(participant); } else { return nullptr;