[Kstars-devel] KDE/kdeedu/kstars/kstars

Khudyakov Alexey alexey.skladnoy at gmail.com
Sat Aug 22 21:29:26 CEST 2009


В сообщении от Суббота 22 августа 2009 16:20:35 автор Akarsh Simha написал:
> Is that because the KStarsData::Instance() method does not create an
> instance, and returns NULL if no instance of KStarsData is created?
>
> Is this something that got introduced during refactoring of
> initialization?
>
Exactly. pInstance pointer is set only after KStars construction. If 
Instance() is called in the constructor it returns NULL. Before refactoring 
used signal/slots to call initialization functions. I changed it to plain 
calls. Apparently they run after constructor completion. 

There are two methods of dealing with this. One is to set pinstance right in 
the constructor. Downside of this approach is that Instance will return 
incompletely initialized object. Second is to ensure that Instance is not 
called in the constructor.

I think first option is better in our circumstances. 


В сообщении от Суббота 22 августа 2009 12:53:42 автор Prakash Mohan написал:
> Yeah, this has been causing a lot of crashes of late. Your code seems
> like the fix, could you commit it?
>
Strange. It shouldn't. This is copy-paste from current code.


More information about the Kstars-devel mailing list