summaryrefslogtreecommitdiff
path: root/src/thread_win32.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread_win32.cpp')
-rw-r--r--src/thread_win32.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/thread_win32.cpp b/src/thread_win32.cpp
index 6f12a6fbc..83bb5a76a 100644
--- a/src/thread_win32.cpp
+++ b/src/thread_win32.cpp
@@ -87,7 +87,7 @@ public:
if (!IsRunning()) return false;
/* For now we terminate by throwing an error, gives much cleaner cleanup */
- throw 0;
+ throw OTTDThreadExitSignal();
}
/* virtual */ void Join()
@@ -128,7 +128,9 @@ private:
{
try {
m_proc(m_param);
+ } catch (OTTDThreadExitSignal) {
} catch (...) {
+ NOT_REACHED();
}
}
};