[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdelibs/kdecore
From: Luboš Luňák <l.lunak () kde ! org>
Date: 2008-05-14 13:51:29
Message-ID: 1210773089.682560.18180.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 807710 by lunakl:
I hate C APIs.
M +6 -3 kapplication.cpp
--- branches/KDE/3.5/kdelibs/kdecore/kapplication.cpp #807709:807710
@@ -1253,16 +1253,19 @@
unsigned char* data;
if( XGetWindowProperty( dpy, DefaultRootWindow( dpy ), XInternAtom( dpy, \
"KDE_FULL_SESSION", False ),
0, 1, False, AnyPropertyType, &type, &format, &nitems, &after, &data ) == \
Success ) { + if( data != NULL )
+ XFree( data );
if( type == XA_STRING && format == 8 ) { // session set, check if \
KDE_SESSION_VERSION is not set (meaning KDE3)
- unsigned char* data;
if( XGetWindowProperty( dpy, DefaultRootWindow( dpy ), XInternAtom( dpy, \
"KDE_SESSION_VERSION", False ),
0, 1, False, AnyPropertyType, &type, &format, &nitems, &after, &data \
) == Success ) {
- XFree( data ); // KDE4 or newer
+ if( data != NULL )
+ XFree( data ); // KDE4 or newer
+ if( type == None )
+ return; // we run in our native session, no need to wrap
} else {
return; // we run in our native session, no need to wrap
}
}
- XFree( data );
}
QString wrapper = KStandardDirs::findExe( "kde3" );
QStringList restartCommand = sm.restartCommand();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic