[Xfce4-commits] r29742 - in xfce4-panel/trunk: . panel

Nick Schermer nick at xfce.org
Thu Apr 9 21:40:44 CEST 2009


Author: nick
Date: 2009-04-09 19:40:44 +0000 (Thu, 09 Apr 2009)
New Revision: 29742

Modified:
   xfce4-panel/trunk/NEWS
   xfce4-panel/trunk/panel/panel-app.c
Log:
Fix a possible crash when setting the session restart style on an
uninitialized client session.


Modified: xfce4-panel/trunk/NEWS
===================================================================
--- xfce4-panel/trunk/NEWS	2009-04-09 19:30:00 UTC (rev 29741)
+++ xfce4-panel/trunk/NEWS	2009-04-09 19:40:44 UTC (rev 29742)
@@ -10,6 +10,8 @@
 - Disconnect the icon theme changed signal from a launcher when it
   is destroyed to avoid crash when the icon theme changes.
 - Fix drawing dots mode of the seperator plugin in a vertical panel (bug #5162).
+- Fix a possible crash when setting the session restart style on an
+  uninitialized client session.
 
 
 4.6.0

Modified: xfce4-panel/trunk/panel/panel-app.c
===================================================================
--- xfce4-panel/trunk/panel/panel-app.c	2009-04-09 19:30:00 UTC (rev 29741)
+++ xfce4-panel/trunk/panel/panel-app.c	2009-04-09 19:40:44 UTC (rev 29742)
@@ -252,7 +252,7 @@
             break;
 
         default:
-            if (panel_app.session_client)
+            if (panel_app.session_client != NULL)
             {
                 logout_session (panel_app.session_client);
             }
@@ -272,7 +272,9 @@
     {
         /* we quit on purpose, update session manager so 
          * it does not restart the program immediately */
-        client_session_set_restart_style(panel_app.session_client, SESSION_RESTART_IF_RUNNING);
+        if (panel_app.session_client != NULL)
+            client_session_set_restart_style (panel_app.session_client,
+                                              SESSION_RESTART_IF_RUNNING);
         
         if (panel_app.save_id)
         {
@@ -761,7 +763,7 @@
     MARK("end main loop");
 
     /* cleanup */
-    if (panel_app.session_client)
+    if (panel_app.session_client != NULL)
         client_session_free (panel_app.session_client);
 
     cleanup_panels ();




More information about the Xfce4-commits mailing list