Commit 7266a73b authored by Vincent Untz's avatar Vincent Untz Committed by Vincent Untz

just don't return a keyfile if there's no restart command for this client

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.

svn path=/trunk/; revision=5354
parent 5b0ca224
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.
2009-03-24 Vincent Untz <vuntz@gnome.org>
* gnome-session/gsm-xsmp-client.c: (xsmp_get_discard_command):
......
......@@ -618,7 +618,7 @@ static GKeyFile *
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 @@ xsmp_save (GsmClient *client,
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 @@ xsmp_save (GsmClient *client,
"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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment