diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2015-02-26 09:42:03 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2015-02-26 09:42:03 +0000 |
| commit | 3b2cc6d44e87c32cac0fb5c35229cc3326a860a4 (patch) | |
| tree | e226b8324bb300f2e2a0555773bb1053648e18a9 /lib/libstdthreads/thrd.c | |
| parent | 12fe6c356b046924ac824e8a9b08beb118ab3e7e (diff) | |
Notes
Diffstat (limited to 'lib/libstdthreads/thrd.c')
| -rw-r--r-- | lib/libstdthreads/thrd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libstdthreads/thrd.c b/lib/libstdthreads/thrd.c index f0ce55a567c4..b0e36ef618fb 100644 --- a/lib/libstdthreads/thrd.c +++ b/lib/libstdthreads/thrd.c @@ -108,7 +108,8 @@ thrd_join(thrd_t thr, int *res) if (pthread_join(thr, &value_ptr) != 0) return (thrd_error); - *res = (intptr_t)value_ptr; + if (res != NULL) + *res = (intptr_t)value_ptr; return (thrd_success); } |
