[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: somewhat trivial patch for my app
From: KStars <kstars () 30doradus ! org>
Date: 2002-04-18 22:04:58
[Download RAW message or body]
Hello,
I have a 2-line patch to apply to my app (KStars) in the KDE_3_0_BRANCH. It's
tiny, but it does fix the crash that a couple of people have reported(*).
So, in the interest of presenting all changes to this branch for peer review,
here it is:
--- skymap.cpp 2002/03/30 21:57:37 1.25.2.1
+++ skymap.cpp 2002/04/18 21:41:28
@@ -79,6 +79,8 @@ SkyMap::SkyMap(QWidget *parent, const ch
sky = new QPixmap();
pmenu = new QPopupMenu();
+ FoundObject = NULL;
+ ClickedObject = NULL;
}
If there are no objections, I'll commit this tomorrow.
(*) I should note that valgrind helped me find these uninitialized pointers.
However, I'm curious about something: The constructor declaration looks like
this:
SkyMap::SkyMap(QWidget *parent, const char *name )
: QWidget (parent,name), ClickedObject(0), FoundObject(0), downloads (0),
computeSkymap (true) {
Why isn't it good enough to have "ClickedObject(0), FoundObject(0)" to
initialize these pointers, why do I have to also declare them as NULL?
It's also odd that this causes crashes only on some people's
machines...different compiler versions perhaps?
thanks,
Jason
--
KStars: A K Desktop Planetarium
http://edu.kde.org/kstars
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic