QTfrontend/hwform.cpp
changeset 13694 27e5e311c7a3
parent 13678 1aa5e884326a
child 13823 a8fd5490932f
--- a/QTfrontend/hwform.cpp	Tue Aug 21 23:56:49 2018 +0200
+++ b/QTfrontend/hwform.cpp	Wed Aug 22 15:00:04 2018 +0200
@@ -1746,7 +1746,15 @@
             Music(ui.pageOptions->CBFrontendMusic->isChecked());
             if (wBackground) wBackground->startAnimation();
             GoToPage(ID_PAGE_GAMESTATS);
-            if (hwnet && (!game || !game->netSuspend)) hwnet->gameFinished(true);
+            if (hwnet)
+            {
+                if (!game || !game->netSuspend)
+                    hwnet->gameFinished(true);
+                // After a game, the local player might have pseudo-teams left
+                // when rejoining a previously left game. This makes sure the
+                // teams list is in a consistent state.
+                ui.pageNetGame->cleanupFakeNetTeams();
+            }
             if (game) game->netSuspend = false;
             break;
         }