diff options
Diffstat (limited to 'ptw32_throw.c')
-rw-r--r-- | ptw32_throw.c | 7 |
1 files changed, 6 insertions, 1 deletions
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) |