diff options
Diffstat (limited to 'lib/libpthread/thread/thr_create.c')
-rw-r--r-- | lib/libpthread/thread/thr_create.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libpthread/thread/thr_create.c b/lib/libpthread/thread/thr_create.c index e4925a9..398ff21 100644 --- a/lib/libpthread/thread/thr_create.c +++ b/lib/libpthread/thread/thr_create.c @@ -199,7 +199,8 @@ _thread_create(pthread_t * thread, const pthread_attr_t * attr, _thread_link_list = new_thread; /* Return a pointer to the thread structure: */ - (*thread) = new_thread; + if(thread) + (*thread) = new_thread; /* Check if a parent thread was specified: */ if (parent != NULL) { |