Fixed crash when getting a spy and expanding a city simultaneously (#7849)

This commit is contained in:
Xander Lenstra 2022-09-23 13:16:29 +02:00 committed by GitHub
parent 14d253fe24
commit e2187a268f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,7 +127,9 @@ class EspionageManager : IsPartOfGameInfoSerialization {
fun addSpy(): String {
val spyName = getSpyName()
spyList.add(Spy(spyName))
val newSpy = Spy(spyName)
newSpy.setTransients(civInfo)
spyList.add(newSpy)
++spyCount
return spyName
}