src/thread_win32.cpp
branchnoai
changeset 11095 a0da321a39b3
parent 10867 5de2923d6e59
child 11096 4c9f93632d0b
--- a/src/thread_win32.cpp	Mon Jun 30 10:26:40 2008 +0000
+++ b/src/thread_win32.cpp	Mon Jun 30 10:40:50 2008 +0000
@@ -87,7 +87,7 @@
 		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 @@
 	{
 		try {
 			m_proc(m_param);
+		} catch (OTTDExitSignal e) {
 		} catch (...) {
+			NOT_REACHED();
 		}
 	}
 };