gameServer2/src/server/handlers/inroom.rs
changeset 13431 f091f69d59e4
parent 13429 d8354cb98b98
child 13432 6f6a866c86a2
--- a/gameServer2/src/server/handlers/inroom.rs	Tue Jun 26 23:20:28 2018 -0400
+++ b/gameServer2/src/server/handlers/inroom.rs	Wed Jun 27 17:58:33 2018 +0300
@@ -262,8 +262,10 @@
                     c.is_in_game = false;
                     actions.push(ClientFlags("-g".to_string(), vec![c.nick.clone()]).
                         send_all().in_room(r.id).action());
-                    for team in r.client_teams(c.id) {
-                        actions.push(SendTeamRemovalMessage(team.name.clone()));
+                    if r.game_info.is_some() {
+                        for team in r.client_teams(c.id) {
+                            actions.push(SendTeamRemovalMessage(team.name.clone()));
+                        }
                     }
                 }
             }