2
0
Эх сурвалжийг харах

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

fixes #1714
Andrey Filipenkov 2 жил өмнө
parent
commit
8f638e7ca6

+ 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)