From: Lyberta Date: Thu, 26 Jul 2018 14:18:11 +0000 (+0300) Subject: Fixed warning when manually changing teams for the first time. X-Git-Tag: xonotic-v0.8.5~1946^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=37caa9f0b64e84411867e24b43252b4e7247bf7f;p=xonotic%2Fxonotic-data.pk3dir.git Fixed warning when manually changing teams for the first time. --- diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index d19ae95be..2c41ae18b 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -958,5 +958,9 @@ void SV_ChangeTeam(entity this, float _color) { return; } + if (source_team_index == -1) + { + return; + } TeamBalance_AutoBalanceBots(destination_team_index, source_team_index); }