diff --git a/plugins/samplesource/airspyhf/airspyhfinput.cpp b/plugins/samplesource/airspyhf/airspyhfinput.cpp index f1a81ab94..715b78e58 100644 --- a/plugins/samplesource/airspyhf/airspyhfinput.cpp +++ b/plugins/samplesource/airspyhf/airspyhfinput.cpp @@ -292,7 +292,8 @@ int AirspyHFInput::getSampleRate() const uint32_t AirspyHFInput::getSampleRateFromIndex(quint32 devSampleRateIndex) const { - int index; + int index = (int) devSampleRateIndex; + if (devSampleRateIndex >= m_sampleRates.size()) { index = m_sampleRates.size() - 1; }