diff --git a/channels/chan_console.c b/channels/chan_console.c index 7d62e6235c..7911b55b3f 100644 --- a/channels/chan_console.c +++ b/channels/chan_console.c @@ -391,7 +391,7 @@ return_unlock: static int stop_stream(struct console_pvt *pvt) { - if (!pvt->streamstate) + if (!pvt->streamstate || pvt->thread == AST_PTHREADT_NULL) return 0; pthread_cancel(pvt->thread);