diff --git a/PlutoSDR_Settings.cpp b/PlutoSDR_Settings.cpp index 40afba9..13dcc6d 100644 --- a/PlutoSDR_Settings.cpp +++ b/PlutoSDR_Settings.cpp @@ -245,8 +245,9 @@ SoapySDR::ArgInfo SoapyPlutoSDR::getSensorInfo(const std::string &key) const iio_channel *chn = iio_device_find_channel(dev, channelStr.c_str(), false); //if (!chn) ... + const char *name = iio_channel_get_name(chn); info.key = key; - info.name = iio_channel_get_name(chn); + if (name) info.name = name; info.type = SoapySDR::ArgInfo::FLOAT; info.value = "0.0"; info.units = id_to_unit(channelStr.c_str());