[totem] Fix screensaver code warnings
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [totem] Fix screensaver code warnings
- Date: Fri, 16 Oct 2009 15:39:23 +0000 (UTC)
commit af8b6fa4701429a53590be8d803429e9b8b4c846
Author: Bastien Nocera <hadess hadess net>
Date: Fri Oct 16 16:34:44 2009 +0100
Fix screensaver code warnings
Avoid warnings because of our re-use of GErrors.
When the "new" (-ish) APIs of gnome-screensaver fail, don't overwrite
the existing GError, and print the original error.
https://bugzilla.gnome.org/show_bug.cgi?id=598173
lib/totem-scrsaver.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/lib/totem-scrsaver.c b/lib/totem-scrsaver.c
index 089cbb0..6854ed4 100644
--- a/lib/totem-scrsaver.c
+++ b/lib/totem-scrsaver.c
@@ -130,10 +130,12 @@ screensaver_inhibit_dbus (TotemScrsaver *scr,
/* try the old API */
res = dbus_g_proxy_call (scr->priv->gs_proxy,
"InhibitActivation",
- &error,
+ NULL,
G_TYPE_STRING, reason,
G_TYPE_INVALID,
G_TYPE_INVALID);
+ if (res)
+ g_error_free (error);
}
g_free (reason);
@@ -153,9 +155,11 @@ screensaver_inhibit_dbus (TotemScrsaver *scr,
/* try the old API */
res = dbus_g_proxy_call (scr->priv->gs_proxy,
"AllowActivation",
- &error,
+ NULL,
G_TYPE_INVALID,
G_TYPE_INVALID);
+ if (res)
+ g_error_free (error);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]