[prev in list] [next in list] [prev in thread] [next in thread]
List: kstars-devel
Subject: [Kstars-devel] [kstars] kstars/skycomponents: Hack to fix constant crash I keep getting when zooming
From: Jasem Mutlaq <mutlaqja () ikarustech ! com>
Date: 2013-12-26 15:58:04
Message-ID: E1VwDK0-0006LV-Vr () scm ! kde ! org
[Download RAW message or body]
Git commit 0aad797c21d8dd59c70f655d62f4f85f4d5fad17 by Jasem Mutlaq.
Committed on 26/12/2013 at 15:56.
Pushed by mutlaqja into branch 'master'.
Hack to fix constant crash I keep getting when zooming in and out. There is \
a problem with comet magnitude it is sometimes returned as NAN and this \
leads to a crash subsequently. Please investigate this further.
CCMAIL:kstars-devel@kde.org
M +7 -3 kstars/skycomponents/cometscomponent.cpp
http://commits.kde.org/kstars/0aad797c21d8dd59c70f655d62f4f85f4d5fad17
diff --git a/kstars/skycomponents/cometscomponent.cpp \
b/kstars/skycomponents/cometscomponent.cpp index fdd241f..e3b6540 100644
--- a/kstars/skycomponents/cometscomponent.cpp
+++ b/kstars/skycomponents/cometscomponent.cpp
@@ -190,9 +190,13 @@ void CometsComponent::draw( SkyPainter *skyp )
foreach ( SkyObject *so, m_ObjectList ) {
KSComet *com = (KSComet*)so;
- bool drawn = skyp->drawPointSource(com,com->mag());
- if ( drawn && !(hideLabels || com->rsun() >= rsunLabelLimit) )
- SkyLabeler::AddLabel( com, SkyLabeler::COMET_LABEL );
+ double mag= com->mag();
+ if (isnan(mag) == 0)
+ {
+ bool drawn = skyp->drawPointSource(com,mag);
+ if ( drawn && !(hideLabels || com->rsun() >= rsunLabelLimit) )
+ SkyLabeler::AddLabel( com, SkyLabeler::COMET_LABEL );
+ }
}
}
_______________________________________________
Kstars-devel mailing list
Kstars-devel@kde.org
https://mail.kde.org/mailman/listinfo/kstars-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic