From 64e4b89f83fe51753e9bc09f015173c896fdd23a Mon Sep 17 00:00:00 2001 From: doclic Date: Sat, 8 Mar 2025 16:13:46 +0100 Subject: [PATCH] tf2: Fix crash with game_round_win in koth Fixes https://github.com/ValveSoftware/Source-1-Games/issues/4254 --- src/game/server/team_control_point_master.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/game/server/team_control_point_master.cpp b/src/game/server/team_control_point_master.cpp index 94b21d2bd..ba9c5e3df 100644 --- a/src/game/server/team_control_point_master.cpp +++ b/src/game/server/team_control_point_master.cpp @@ -1156,6 +1156,8 @@ int CTeamControlPointMaster::GetNumPointsOwnedByTeam( int iTeam ) //----------------------------------------------------------------------------- int CTeamControlPointMaster::CalcNumRoundsRemaining( int iTeam ) { + if (m_ControlPointRounds.Count() == 0) return 0; + // To determine how many rounds remain for a given team if it consistently wins mini-rounds, we have to // simulate forward each mini-round and track the control point ownership that would result