gnome-session r5354 - in trunk: . gnome-session
- From: vuntz svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-session r5354 - in trunk: . gnome-session
- Date: Tue, 24 Mar 2009 22:35:49 +0000 (UTC)
Author: vuntz
Date: Tue Mar 24 22:35:49 2009
New Revision: 5354
URL: http://svn.gnome.org/viewvc/gnome-session?rev=5354&view=rev
Log:
2009-03-24 Vincent Untz <vuntz gnome org>
* gnome-session/gsm-xsmp-client.c: (xsmp_save): just don't return a
keyfile if there's no restart command for this client (ie, we won't
save this client). Also make sure keyfile is properly initialized to
NULL to avoid an undefined return value in that case.
Modified:
trunk/ChangeLog
trunk/gnome-session/gsm-xsmp-client.c
Modified: trunk/gnome-session/gsm-xsmp-client.c
==============================================================================
--- trunk/gnome-session/gsm-xsmp-client.c (original)
+++ trunk/gnome-session/gsm-xsmp-client.c Tue Mar 24 22:35:49 2009
@@ -618,7 +618,7 @@
xsmp_save (GsmClient *client,
GError **error)
{
- GKeyFile *keyfile;
+ GKeyFile *keyfile = NULL;
char *desktop_file_path = NULL;
char *exec_program = NULL;
char *exec_discard = NULL;
@@ -630,6 +630,11 @@
local_error = NULL;
+ exec_program = xsmp_get_restart_command (client);
+ if (!exec_program) {
+ goto out;
+ }
+
desktop_file_path = get_desktop_file_path (GSM_XSMP_CLIENT (client));
keyfile = create_client_key_file (client,
@@ -649,7 +654,6 @@
"X-GNOME-Autostart-startup-id",
startup_id);
- exec_program = xsmp_get_restart_command (client);
g_key_file_set_string (keyfile,
G_KEY_FILE_DESKTOP_GROUP,
G_KEY_FILE_DESKTOP_KEY_EXEC,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]