[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeedu/kstars/kstars/skycomponents
From:       Akarsh Simha <akarshsimha () gmail ! com>
Date:       2010-10-15 7:29:28
Message-ID: 20101015072929.00836AC895 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1186058 by asimha:

Fix crash that I overlooked. It was too early in the initialization,
to point the SkyObject list at the
KStars::Instance()->observingList()->sessionList(). Also, add some
safety checks in TargetListComponent.

 M  +3 -1      skymapcomposite.cpp  
 M  +2 -0      targetlistcomponent.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/skymapcomposite.cpp #1186057:1186058
@@ -92,7 +92,7 @@
     addComponent( m_SolarSystem = new SolarSystemComposite( this ));
     addComponent( m_Flags       = new FlagComponent( this ));
 
-    addComponent( m_ObservingList = new TargetListComponent( this , \
&KStars::Instance()->observingList()->sessionList(), QPen(), +    addComponent( \
                m_ObservingList = new TargetListComponent( this , 0, QPen(),
                                                              \
&Options::obsListSymbol, &Options::obsListText ) );  
     connect( this, SIGNAL( progressText( const QString & ) ),
@@ -239,6 +239,8 @@
     m_Flags->draw( psky );
 
     m_ObservingList->pen = QPen( QColor(data->colorScheme()->colorNamed( \
"ObsListColor" )), int(SkyMap::Instance()->scale()) ); +    if( \
!m_ObservingList->list ) +        m_ObservingList->list = \
&KStars::Instance()->observingList()->sessionList();  m_ObservingList->draw( psky );
 
     m_skyMesh->inDraw( false );
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/targetlistcomponent.cpp \
#1186057:1186058 @@ -64,6 +64,8 @@
     psky.setPen( pen );
     if( drawSymbols && !(*drawSymbols)() )
         return;
+    if( !list || list->count() <= 0 )
+        return;
     foreach( SkyObject *obj, *list ) {
         drawTargetSymbol( psky, obj );
     }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic