summaryrefslogtreecommitdiff
path: root/src/genworld.cpp
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2008-06-08 12:06:27 +0000
committertruebrain <truebrain@openttd.org>2008-06-08 12:06:27 +0000
commitb95042b05cf7a8117309edc158df252f6f4adacb (patch)
tree824116881f6d5514cdaa069f10eddac84da3b04a /src/genworld.cpp
parent96d7f87cc99ee04791b9fa097a027a17bb82226b (diff)
downloadopenttd-b95042b05cf7a8117309edc158df252f6f4adacb.tar.xz
(svn r13412) -Add: OTTDThreadTerminateFunc, for all thread systems, which is called when a thread is terminated. Now GenWorld- and SaveLoad-thread cleanup theirselves correctly, while Fibers don't (as that causes access-violations)
Diffstat (limited to 'src/genworld.cpp')
-rw-r--r--src/genworld.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/genworld.cpp b/src/genworld.cpp
index 88e4633e6..424750165 100644
--- a/src/genworld.cpp
+++ b/src/genworld.cpp
@@ -288,7 +288,7 @@ void GenerateWorld(GenerateWorldMode mode, uint size_x, uint size_y)
SetupColorsAndInitialWindow();
if (_network_dedicated ||
- (_gw.thread = ThreadObject::New(&_GenerateWorld, NULL)) == NULL) {
+ (_gw.thread = ThreadObject::New(&_GenerateWorld, NULL, &ThreadObject::TerminateCleanup)) == NULL) {
DEBUG(misc, 1, "Cannot create genworld thread, reverting to single-threaded mode");
_gw.threaded = false;
_GenerateWorld(NULL);