diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/threadpool.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/threadpool.c b/src/server/threadpool.c index c01ae7a..340a98d 100644 --- a/src/server/threadpool.c +++ b/src/server/threadpool.c @@ -50,6 +50,10 @@ void threadpool_close() bool threadpool_run(void *(*startRoutine)(void *), void *arg) { + if ( startRoutine == NULL ) { + logadd( LOG_ERROR, "Trying to queue work for thread pool with NULL startRoutine" ); + return false; // Or bail out!? + } pthread_spin_lock( &poolLock ); entry_t *entry = pool; if ( entry != NULL ) { |