1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 09:48:45 -05:00

Fix crash if no device settings have been set up.

This commit is contained in:
Jon Beniston 2023-05-23 22:27:35 +01:00
parent 8260721f2d
commit 65013b47ff

View File

@ -811,7 +811,8 @@ void SatelliteTrackerWorker::applyDeviceAOSSettings(const QString& name)
void SatelliteTrackerWorker::enableDoppler(SatWorkerState *satWorkerState)
{
QList<SatelliteTrackerSettings::SatelliteDeviceSettings *> *m_deviceSettingsList = m_settings.m_deviceSettings.value(satWorkerState->m_name);
if (m_deviceSettingsList)
{
satWorkerState->m_doppler.clear();
bool requiresDoppler = false;
for (int i = 0; i < m_deviceSettingsList->size(); i++)
@ -835,6 +836,7 @@ void SatelliteTrackerWorker::enableDoppler(SatWorkerState *satWorkerState)
});
}
}
}
void SatelliteTrackerWorker::disableDoppler(SatWorkerState *satWorkerState)
{
@ -874,7 +876,7 @@ void SatelliteTrackerWorker::doppler(SatWorkerState *satWorkerState)
qDebug() << "SatelliteTrackerWorker::doppler " << satWorkerState->m_name;
QList<SatelliteTrackerSettings::SatelliteDeviceSettings *> *m_deviceSettingsList = m_settings.m_deviceSettings.value(satWorkerState->m_name);
if (m_deviceSettingsList != nullptr)
if (m_deviceSettingsList)
{
for (int i = 0; i < m_deviceSettingsList->size(); i++)
{