diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c index 7238e6f81..6ebcda23c 100644 --- a/src/modules/bluetooth/module-bluez5-device.c +++ b/src/modules/bluetooth/module-bluez5-device.c @@ -1575,9 +1575,9 @@ static void stop_thread(struct userdata *u) { } if (u->rtpoll) { - pa_thread_mq_done(&u->thread_mq); pa_rtpoll_free(u->rtpoll); u->rtpoll = NULL; + pa_thread_mq_done(&u->thread_mq); } if (u->transport) {