Fix #9402, 2e136285: Crash when founding town using default name (#9403)

This commit is contained in:
Loïc Guilloux 2021-06-27 17:18:21 +02:00 committed by GitHub
parent da7621cc55
commit 87eb0e4fce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1151,7 +1151,7 @@ public:
void ExecuteFoundTownCommand(TileIndex tile, bool random, StringID errstr, CommandCallback cc)
{
const char *name = nullptr;
std::string name;
if (!this->townnamevalid) {
name = this->townname_editbox.text.buf;