[Kstars-devel] kdeedu/kstars/kstars
Jason Harris
kstars at 30doradus.org
Fri Jun 18 06:51:19 CEST 2004
CVS commit by harris:
I was about to send a message to kde-devel about our KNewStuff crash,
when I realized the solution. The slotDownload() function has this
line:
if (!kns) kns = new KSNewStuff( this );
But the kns pointer was never explicitly initialized to NULL (0), so
it's not guaranteed to be NULL at startup. I don't know why starting
from the command line produced a different result from starting from the
K menu, but I fixed the problem by initializing kns(0) in the KStars
ctor.
Ah, silliness. Keeps me humble. Anyway, I'll go through the code to
see if we have anymore uninit-pointer suprises waiting to be noticed...
CCMAIL: kstars-devel at kde.org
M +9 -9 kstars.cpp 1.84
--- kdeedu/kstars/kstars/kstars.cpp #1.83:1.84
@@ -44,5 +44,5 @@ KStars::KStars( bool doSplash ) :
DCOPObject("KStarsInterface"), KMainWindow(),
skymap(0), findDialog(0), centralWidget(0),
- AAVSODialog(0), DialogIsObsolete(false)
+ AAVSODialog(0), kns(0), DialogIsObsolete(false)
{
pd = new privatedata(this);
More information about the Kstars-devel
mailing list