From 1a1c1b8e0a97254afaa6a0e1d697ef24283b7485 Mon Sep 17 00:00:00 2001 From: Andreas Maerten <24669514+Yimura@users.noreply.github.com> Date: Sat, 9 Sep 2023 11:32:55 +0200 Subject: [PATCH] fix(MultiKick): Crash when calling CNetGamePlayer::is_host (#2106) --- src/backend/commands/player/kick/multi_kick.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/commands/player/kick/multi_kick.cpp b/src/backend/commands/player/kick/multi_kick.cpp index a7ac0880..14bb7c1f 100644 --- a/src/backend/commands/player/kick/multi_kick.cpp +++ b/src/backend/commands/player/kick/multi_kick.cpp @@ -25,7 +25,7 @@ namespace big if (g_player_service->get_self()->is_host()) dynamic_cast(command::get(RAGE_JOAAT("hostkick")))->call(player, {}); - if (player && !player->is_host() && !g_player_service->get_self()->is_host()) + if (player && !g_player_service->get_self()->is_host() && player->is_valid() && !player->is_host()) dynamic_cast(command::get(RAGE_JOAAT("desync")))->call(player, {}); if (g_player_service->get_self()->is_host())