rf_imp.c: fix segfault when closing RF device with no AGC thread

master
Robert Falkenberg 3 years ago committed by Andre Puschmann
parent a066236a96
commit b0430ebfe2

@ -181,7 +181,9 @@ int srsran_rf_close(srsran_rf_t* rf)
} }
pthread_mutex_unlock(&rf->mutex); pthread_mutex_unlock(&rf->mutex);
pthread_cond_signal(&rf->cond); 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); return ((rf_dev_t*)rf->dev)->srsran_rf_close(rf->handler);
} }

Loading…
Cancel
Save