mirror of https://github.com/PentHertz/srsLTE.git
rf_imp.c: fix segfault when closing RF device with no AGC thread
This commit is contained in:
parent
a066236a96
commit
b0430ebfe2
|
@ -181,7 +181,9 @@ int srsran_rf_close(srsran_rf_t* rf)
|
|||
}
|
||||
pthread_mutex_unlock(&rf->mutex);
|
||||
pthread_cond_signal(&rf->cond);
|
||||
pthread_join(rf->thread_gain, NULL);
|
||||
if (rf->thread_gain) {
|
||||
pthread_join(rf->thread_gain, NULL);
|
||||
}
|
||||
|
||||
return ((rf_dev_t*)rf->dev)->srsran_rf_close(rf->handler);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue