summaryrefslogtreecommitdiff
path: root/src/console_cmds.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-05-01 19:55:46 +0200
committerMichael Lutz <michi@icosahedron.de>2021-05-02 17:57:24 +0200
commit1f159f79de7428cbaa6133ec9cf06ce559980ea6 (patch)
treeebdfebfbca17f8ab485198b48c473a1138f3be8f /src/console_cmds.cpp
parent91b8ce073f54dff48cd61186c32d0a720a2abb4d (diff)
downloadopenttd-1f159f79de7428cbaa6133ec9cf06ce559980ea6.tar.xz
Fix #9147: Delay making screenshots until the next draw tick as we may not access the video buffer from the game thread.
Diffstat (limited to 'src/console_cmds.cpp')
-rw-r--r--src/console_cmds.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp
index 69a44e63d..99b3b5458 100644
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -1416,7 +1416,7 @@ DEF_CONSOLE_CMD(ConScreenShot)
ScreenshotType type = SC_VIEWPORT;
uint32 width = 0;
uint32 height = 0;
- const char *name = nullptr;
+ std::string name{};
uint32 arg_index = 1;
if (argc > arg_index) {