Selaa lähdekoodia

[editor] fix Player Settings crash when random town is added to a map

fixes #1714
Andrey Filipenkov 2 vuotta sitten
vanhempi
sitoutus
8f638e7ca6
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      mapeditor/playerparams.cpp

+ 3 - 0
mapeditor/playerparams.cpp

@@ -59,7 +59,10 @@ PlayerParams::PlayerParams(MapController & ctrl, int playerId, QWidget *parent)
 		{
 			auto * ctown = town->town;
 			if(!ctown)
+			{
 				ctown = VLC->townh->randomTown;
+				town->town = ctown;
+			}
 			if(ctown && town->getOwner().getNum() == playerColor)
 			{
 				if(playerInfo.hasMainTown && playerInfo.posOfMainTown == town->pos)