Explorar o código

Fix rare crash if player changes starting hero in MP while another has
town right-click popup open

Ivan Savenko hai 6 meses
pai
achega
3dd15beede
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      client/lobby/OptionsTab.cpp

+ 3 - 2
client/lobby/OptionsTab.cpp

@@ -68,13 +68,14 @@ void OptionsTab::recreate()
 	entries.clear();
 	humanPlayers = 0;
 
+	for (auto tooltipWindow : GH.windows().findWindows<CPlayerOptionTooltipBox>())
+		tooltipWindow->close();
+
 	for (auto heroOverview : GH.windows().findWindows<CHeroOverview>())
 		heroOverview->close();
 
 	for (auto selectionWindow : GH.windows().findWindows<SelectionWindow>())
-	{
 		selectionWindow->reopen();
-	}
 
 	OBJECT_CONSTRUCTION;
 	for(auto & pInfo : SEL->getStartInfo()->playerInfos)