gnome-session r5348 - in trunk: . gnome-session
- From: vuntz svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-session r5348 - in trunk: . gnome-session
- Date: Tue, 24 Mar 2009 22:12:08 +0000 (UTC)
Author: vuntz
Date: Tue Mar 24 22:12:07 2009
New Revision: 5348
URL: http://svn.gnome.org/viewvc/gnome-session?rev=5348&view=rev
Log:
2009-03-24 Vincent Untz <vuntz gnome org>
* gnome-session/gsm-inhibit-dialog.c: (add_inhibitor): handle NULL
errors instead of crashing, which can happen in some cases in
EggDesktopFile.
Modified:
trunk/ChangeLog
trunk/gnome-session/gsm-inhibit-dialog.c
Modified: trunk/gnome-session/gsm-inhibit-dialog.c
==============================================================================
--- trunk/gnome-session/gsm-inhibit-dialog.c (original)
+++ trunk/gnome-session/gsm-inhibit-dialog.c Tue Mar 24 22:12:07 2009
@@ -531,8 +531,14 @@
/* look for a file with a vendor prefix */
if (desktop_file == NULL) {
- g_warning ("Unable to find desktop file '%s': %s", desktop_filename, error->message);
- g_error_free (error);
+ if (error) {
+ g_warning ("Unable to find desktop file '%s': %s",
+ desktop_filename, error->message);
+ g_error_free (error);
+ } else {
+ g_warning ("Unable to find desktop file '%s'",
+ desktop_filename);
+ }
g_free (desktop_filename);
desktop_filename = g_strdup_printf ("gnome-%s.desktop", app_id);
error = NULL;
@@ -543,8 +549,14 @@
g_strfreev (search_dirs);
if (desktop_file == NULL) {
- g_warning ("Unable to find desktop file '%s': %s", desktop_filename, error->message);
- g_error_free (error);
+ if (error) {
+ g_warning ("Unable to find desktop file '%s': %s",
+ desktop_filename, error->message);
+ g_error_free (error);
+ } else {
+ g_warning ("Unable to find desktop file '%s'",
+ desktop_filename);
+ }
} else {
name = egg_desktop_file_get_name (desktop_file);
icon_name = egg_desktop_file_get_icon (desktop_file);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]