[Kstars-devel] KDE/kdeedu/kstars/kstars/skycomponents
Akarsh Simha
akarshsimha at gmail.com
Mon Mar 28 03:36:32 CEST 2011
SVN commit 1226244 by asimha:
Fixing crash while dumping the image. While dumping the image, KStars
is not instantiated. Also, there is no observing list defined. This
would lead to a crash. Checking if KStars has been instantiated before
trying to access it fixes this.
CCMAIL: kstars-devel at kde.org
M +4 -1 skymapcomposite.cpp
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/skymapcomposite.cpp #1226243:1226244
@@ -206,11 +206,13 @@
// FIXME: REGRESSION. Labeler now know nothing about infoboxes
// map->infoBoxes()->reserveBoxes( psky );
+ if( KStars::Instance() ) {
const QList<SkyObject*> obsList = KStars::Instance()->observingList()->sessionList();
if( Options::obsListText() )
foreach( SkyObject* obj, obsList ) {
SkyLabeler::AddLabel( obj, SkyLabeler::RUDE_LABEL );
}
+ }
m_MilkyWay->draw( skyp );
@@ -249,8 +251,9 @@
m_DeepSky->drawLabels();
m_ObservingList->pen = QPen( QColor(data->colorScheme()->colorNamed( "ObsListColor" )), 1. );
- if( !m_ObservingList->list )
+ if( KStars::Instance() && !m_ObservingList->list )
m_ObservingList->list = &KStars::Instance()->observingList()->sessionList();
+ if( m_ObservingList )
m_ObservingList->draw( skyp );
m_Flags->draw( skyp );
More information about the Kstars-devel
mailing list