summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkarsh Simha <akarsh@kde.org>2016-08-17 10:33:59 (GMT)
committerAkarsh Simha <akarsh@kde.org>2016-08-17 10:47:54 (GMT)
commit3f0e2d2f094bc33c1e989b83484dc3f7da7c3ffb (patch)
tree6f1850d39907f8e54871d69498168fd9c2f5b42a
parenta759b43ac20d7375fda62286960234744559e68b (diff)
Add asserts to deliniate crashes from not setting the parent customCat
-rw-r--r--kstars/dialogs/detaildialog.cpp1
-rw-r--r--kstars/printing/detailstable.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/kstars/dialogs/detaildialog.cpp b/kstars/dialogs/detaildialog.cpp
index 2192aa4..f95f4fb 100644
--- a/kstars/dialogs/detaildialog.cpp
+++ b/kstars/dialogs/detaildialog.cpp
@@ -288,6 +288,7 @@ void DetailDialog::createGeneralTab()
if (dso->type() == SkyObject::RADIO_SOURCE)
{
+ Q_ASSERT( dso->customCatalog() ); // the in-built catalogs don't have radio sources
Data->MagLabel->setText(i18nc("integrated flux at a frequency", "Flux(%1):", dso->customCatalog()->fluxFrequency()));
Data->Magnitude->setText(i18nc("integrated flux value", "%1 %2",
QLocale().toString(dso->flux(), 'f', 1), dso->customCatalog()->fluxUnit())); //show to tenths place
diff --git a/kstars/printing/detailstable.cpp b/kstars/printing/detailstable.cpp
index 86a302b..333ae05 100644
--- a/kstars/printing/detailstable.cpp
+++ b/kstars/printing/detailstable.cpp
@@ -268,6 +268,7 @@ void DetailsTable::createGeneralTable(SkyObject *obj)
if(dso->type() == SkyObject::RADIO_SOURCE)
{
+ Q_ASSERT( dso->customCatalog() );
objMagLabel = i18nc("integrated flux at a frequency", "Flux(%1):", dso->customCatalog()->fluxFrequency());
objMagVal = i18nc("integrated flux value", "%1 %2", QLocale().toString(dso->flux(), 1),
dso->customCatalog()->fluxUnit()); //show to tenths place