summaryrefslogtreecommitdiff
path: root/src/town_gui.cpp
diff options
context:
space:
mode:
authorLoïc Guilloux <glx22@users.noreply.github.com>2021-06-27 17:18:21 +0200
committerGitHub <noreply@github.com>2021-06-27 17:18:21 +0200
commit87eb0e4fcec76f88c4c502d074b2ae79f48fe09a (patch)
tree4aac0601bfea0bdda3535e5d39e66a63c3d18e3e /src/town_gui.cpp
parentda7621cc557a0f81cb4f9419a65b4d57fe200699 (diff)
downloadopenttd-87eb0e4fcec76f88c4c502d074b2ae79f48fe09a.tar.xz
Fix #9402, 2e136285: Crash when founding town using default name (#9403)
Diffstat (limited to 'src/town_gui.cpp')
-rw-r--r--src/town_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index 021590cb9..2d7aa8f20 100644
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -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;