1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-07-03 09:25:23 -04:00

Merge pull request #894 from srcejon/fix_sat_tracker_tle_excepton

Catch TleException in Satellite Selection Dialog to avoid crash
This commit is contained in:
Edouard Griffiths 2021-05-11 07:52:35 +02:00 committed by GitHub
commit 7184ae925d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,6 +223,8 @@ void SatelliteSelectionDialog::displaySatInfo(const QString& name)
} }
} }
if (sat->m_tle != nullptr) if (sat->m_tle != nullptr)
{
try
{ {
info.append("Orbit:"); info.append("Orbit:");
Tle tle = Tle(sat->m_tle->m_tle0.toStdString(), Tle tle = Tle(sat->m_tle->m_tle0.toStdString(),
@ -233,6 +235,11 @@ void SatelliteSelectionDialog::displaySatInfo(const QString& name)
info.append(QString(" Inclination: %1%2").arg(Units::radiansToDegrees(ele.Inclination())).arg(QChar(0xb0))); info.append(QString(" Inclination: %1%2").arg(Units::radiansToDegrees(ele.Inclination())).arg(QChar(0xb0)));
info.append(QString(" Eccentricity: %1").arg(ele.Eccentricity())); info.append(QString(" Eccentricity: %1").arg(ele.Eccentricity()));
} }
catch (TleException tlee)
{
qDebug() << "SatelliteSelectionDialog::displaySatInfo: TleException " << tlee.what();
}
}
ui->satInfo->setText(info.join("\n")); ui->satInfo->setText(info.join("\n"));
if (!sat->m_image.isEmpty()) if (!sat->m_image.isEmpty())