diff --git a/src/switch_event.c b/src/switch_event.c index e932a067d5..203a6d861d 100644 --- a/src/switch_event.c +++ b/src/switch_event.c @@ -26,7 +26,7 @@ * Anthony Minessale II * Michael Jerris * Paul D. Tinsley - * + * William King * * switch_event.c -- Event System * @@ -254,6 +254,10 @@ static void *SWITCH_THREAD_FUNC switch_event_dispatch_thread(switch_thread_t *th } } + if ( my_id >= MAX_DISPATCH_VAL ) { + return NULL; + } + EVENT_DISPATCH_QUEUE_RUNNING[my_id] = 1; switch_mutex_unlock(EVENT_QUEUE_MUTEX);