diff options
author | Loïc Guilloux <glx22@users.noreply.github.com> | 2021-06-27 17:18:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-27 17:18:21 +0200 |
commit | 87eb0e4fcec76f88c4c502d074b2ae79f48fe09a (patch) | |
tree | 4aac0601bfea0bdda3535e5d39e66a63c3d18e3e /src | |
parent | da7621cc557a0f81cb4f9419a65b4d57fe200699 (diff) | |
download | openttd-87eb0e4fcec76f88c4c502d074b2ae79f48fe09a.tar.xz |
Fix #9402, 2e136285: Crash when founding town using default name (#9403)
Diffstat (limited to 'src')
-rw-r--r-- | src/town_gui.cpp | 2 |
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; |