diff --git a/soapy_source/src/main.cpp b/soapy_source/src/main.cpp index 8314fb26..646e775d 100644 --- a/soapy_source/src/main.cpp +++ b/soapy_source/src/main.cpp @@ -296,6 +296,11 @@ private: static void start(void* ctx) { SoapyModule* _this = (SoapyModule*)ctx; if (_this->running) { return; } + if (_this->devId < 0) { + spdlog::error("No device available"); + return; + } + _this->dev = SoapySDR::Device::make(_this->devArgs); _this->dev->setSampleRate(SOAPY_SDR_RX, _this->channelId, _this->sampleRate);