diff --git a/cec/hdmi_cec.c b/cec/hdmi_cec.c index bb9a1ba..ee2c125 100644 --- a/cec/hdmi_cec.c +++ b/cec/hdmi_cec.c @@ -462,7 +462,8 @@ static int hdmicec_close(struct hdmi_cec_device *dev) if (ctx->exit_fd > 0) { write(ctx->exit_fd, &tmp, sizeof(tmp)); - pthread_join(ctx->thread, NULL); + if (ctx->thread) + pthread_join(ctx->thread, NULL); } if (ctx->cec_fd > 0)