From c99326aa8dc2797567ec48ca18ab413ec2fd4fe5 Mon Sep 17 00:00:00 2001 From: rpj Date: Fri, 6 Jun 2008 00:23:20 +0000 Subject: '' --- ptw32_throw.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ptw32_throw.c') diff --git a/ptw32_throw.c b/ptw32_throw.c index 493f4e4..b276119 100644 --- a/ptw32_throw.c +++ b/ptw32_throw.c @@ -73,6 +73,7 @@ ptw32_throw (DWORD exception) * explicit thread exit here after cleaning up POSIX * residue (i.e. cleanup handlers, POSIX thread handle etc). */ +#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__) unsigned exitCode = 0; switch (exception) @@ -81,9 +82,13 @@ ptw32_throw (DWORD exception) exitCode = (unsigned) PTHREAD_CANCELED; break; case PTW32_EPS_EXIT: - exitCode = (unsigned) sp->exitStatus;; + if (NULL != sp) + { + exitCode = (unsigned) sp->exitStatus; + } break; } +#endif #if defined(PTW32_STATIC_LIB) -- cgit v1.2.3