[Kstars-devel] KDE/kdeedu/kstars/kstars/skycomponents
Jason Harris
kstars at 30doradus.org
Thu Jan 17 19:35:22 CET 2008
SVN commit 762712 by harris:
Potential quick-n-dirty fix for bug #154650. Assuming the
crash was caused by the size of planets being NaN, this
should fix it. Please test!
Note, I still need to figure out *why* the image size is
becoming NaN, this just firewalls the code against the
problem.
CCBUG: 154650
CCMAIL: kstars-devel at kde.org
M +6 -0 solarsystemsinglecomponent.cpp
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/solarsystemsinglecomponent.cpp #762711:762712
@@ -142,6 +142,12 @@
spa = fabs(spa);
size = size * (cpa + spa);
+ //Quick and dirty fix to prevent a crash.
+ //FIXME: Need to figure out why the size is sometimes NaN
+ if ( isnan( size ) ) {
+ size = 10.0;
+ }
+
//Because Saturn has rings, we inflate its image size by a factor 2.5
if ( ksp()->name() == "Saturn" ) size = int(2.5*size);
More information about the Kstars-devel
mailing list