diff options
Diffstat (limited to 'kern/thread.c')
-rw-r--r-- | kern/thread.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kern/thread.c b/kern/thread.c index 85e557d3..e79ef311 100644 --- a/kern/thread.c +++ b/kern/thread.c @@ -2367,7 +2367,9 @@ thread_create(struct thread **threadp, const struct thread_attr *attr, * The new thread address must be written before the thread is started * in case it's passed to it. */ - *threadp = thread; + if (threadp) { + *threadp = thread; + } thread_wakeup(thread); |