patches/lxsession-02-fixcrash.diff
author yippi
Fri, 05 Mar 2010 23:57:55 +0000
changeset 2360 79c86e4af74c
parent 2344 fab55fc826e7
child 2536 50bfaa28e970
permissions -rw-r--r--
2010-03-05 Brian Cameron <[email protected]> * SFEsdl-mixer.spec, base-specs/sdl-mixer.spec, patches/sdl-mixer-01-cflags.diff: Bump to 1.2.11, rework patch. * SFEsdl-image.spec: Add %ifarch around install of arch specific pkgconfig files. * SFEmenu-cache.spec: Bump to 0.3.2. * SFElxterminal.spec: Bump to 0.1.7. * SFElxpanel.spec: Bump to 0.5.5. * patches/lxsession-02-fixcrash.diff: Fix additional crashing issue. * base-specs/abiword.spec: * SFEaspell.spec: Add -xannotate=no to CXXFLAGS and CFLAGS to address doo bug #9720 & bugster #6823945/#6865312. * base-specs/aspell.spec: Add "-I ./m4" to aclocal call, and do not reset CFLAGS. * base-specs/boost.spec: Add "-d+2 -q" to the call to bjam for better debug output. With this option the specific compile/link commands are echoed to the log which makes debugging build problems more simple. The -q option makes the build stop immediately if the build fails rather than continuing the build and finding out about the failure at the end.

--- lxsession-0.4.1/lxsession/autostart.c-orig	2010-03-05 07:10:32.825349483 -0600
+++ lxsession-0.4.1/lxsession/autostart.c	2010-03-05 07:10:41.969033034 -0600
@@ -189,7 +189,7 @@ static void launch_autostart_file( const
             for( i = 0; i < n; ++i )
             {
                 /* Only start this program if we are in the "OnlyShowIn" list */
-                if( 0 == strcmp( de_name, only_show_in[ i ] ) )
+                if( de_name != NULL && 0 == strcmp( de_name, only_show_in[ i ] ) )
                     break;
             }
             if( i >= n )    /* our session name is not found in the list */
@@ -210,7 +210,7 @@ static void launch_autostart_file( const
 				for( i = 0; i < n; ++i )
 				{
 					/* Only start this program if we are in the "OnlyShowIn" list */
-					if( 0 == strcmp( de_name, not_show_in[ i ] ) )
+					if( de_name != NULL && 0 == strcmp( de_name, not_show_in[ i ] ) )
 						break;
 				}
 				if( i < n )    /* our session name is found in the "NotShowIn" list */
--- lxsession-0.4.1/lxsession/lxsession.c-orig	2010-02-15 23:41:33.847859021 -0600
+++ lxsession-0.4.1/lxsession/lxsession.c	2010-02-15 23:43:36.050621365 -0600
@@ -311,7 +311,9 @@ int main(int argc, char** argv)
 
     if ( G_UNLIKELY(!de_name) )
         session_name = session_name;
-    g_setenv( "XDG_CURRENT_DESKTOP", de_name, TRUE );
+    if (de_name != NULL) {
+        g_setenv( "XDG_CURRENT_DESKTOP", de_name, TRUE );
+    }
 
     /* FIXME: load environment variables? */