Merge pull request #1021 from sergeyvfx/fix_start_crash

Fix crash in LimeSDR start when the device is disconnected
This commit is contained in:
AlexandreRouma 2023-03-23 23:20:49 +01:00 committed by GitHub
commit d3d245992d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -330,7 +330,10 @@ private:
if (err) {
LMS_Close(_this->openDev);
LMS_Open(&_this->openDev, _this->devList[_this->devId], NULL);
LMS_Init(_this->openDev);
if (err = LMS_Init(_this->openDev)) {
flog::error("Failed to re-initialize device ({})", err);
return;
}
}
flog::warn("Channel count: {0}", LMS_GetNumChannels(_this->openDev, false));