summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkarsh Simha <akarsh@kde.org>2016-08-17 05:13:10 (GMT)
committerAkarsh Simha <akarsh@kde.org>2016-08-17 05:13:10 (GMT)
commit4eef9eb85388c0155377911a231f59e93da3b48a (patch)
treeaac3287e8264f651ba6f21329c0be401715d258b
parent433369d3a6d8078a04adb97b43e6f3d1160752e0 (diff)
Fix crash when a resolved object could not be entered in the database.
-rw-r--r--kstars/dialogs/finddialog.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/kstars/dialogs/finddialog.cpp b/kstars/dialogs/finddialog.cpp
index 1d67e0f..12012dd 100644
--- a/kstars/dialogs/finddialog.cpp
+++ b/kstars/dialogs/finddialog.cpp
@@ -331,7 +331,8 @@ void FindDialog::slotOk() {
DeepSkyObject *dso = 0;
if( ! std::isnan( cedata.ra ) && ! std::isnan( cedata.dec ) ) {
dso = KStarsData::Instance()->skyComposite()->miscObjectComponent()->addObject( cedata );
- qDebug() << dso->ra0().toHMSString() << ";" << dso->dec0().toDMSString();
+ if( dso )
+ qDebug() << dso->ra0().toHMSString() << ";" << dso->dec0().toDMSString();
selObj = dso;
}
// ==== END buggy testing code ====