fix segfault when ASYNC thread is disabled

master
Andre Puschmann 7 years ago
parent 3a9f224f40
commit b0a79ac616

@ -615,8 +615,11 @@ int rf_uhd_close(void *h)
uhd_tx_metadata_free(&handler->tx_md); uhd_tx_metadata_free(&handler->tx_md);
uhd_rx_metadata_free(&handler->rx_md_first); uhd_rx_metadata_free(&handler->rx_md_first);
uhd_rx_metadata_free(&handler->rx_md); uhd_rx_metadata_free(&handler->rx_md);
#if HAVE_ASYNC_THREAD
handler->async_thread_running = false; handler->async_thread_running = false;
pthread_join(handler->async_thread, NULL); pthread_join(handler->async_thread, NULL);
#endif
uhd_tx_streamer_free(&handler->tx_stream); uhd_tx_streamer_free(&handler->tx_stream);
uhd_rx_streamer_free(&handler->rx_stream); uhd_rx_streamer_free(&handler->rx_stream);

Loading…
Cancel
Save