[Spice-commits] gtk/spice-session.c
Marc-André Lureau
elmarco at kemper.freedesktop.org
Wed Jan 30 03:41:06 PST 2013
gtk/spice-session.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit b170b7f618622f71f2e6b7b1ae65d24f25039c73
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date: Tue Jan 29 18:23:52 2013 +0100
session: clear SpiceSession:proxy also if SPICE_PROXY is NULL
diff --git a/gtk/spice-session.c b/gtk/spice-session.c
index 299bebc..ccc9367 100644
--- a/gtk/spice-session.c
+++ b/gtk/spice-session.c
@@ -127,15 +127,17 @@ static void update_proxy(SpiceSession *self, const gchar *str)
if (str == NULL)
str = g_getenv("SPICE_PROXY");
- if (str == NULL || *str == 0)
+ if (str == NULL || *str == 0) {
+ g_clear_object(&s->proxy);
return;
+ }
proxy = spice_proxy_new();
if (!spice_proxy_parse(proxy, str, &error))
g_clear_object(&proxy);
if (error) {
- g_warning ("%s", error->message);
- g_clear_error (&error);
+ g_warning("%s", error->message);
+ g_clear_error(&error);
}
if (proxy != NULL) {
More information about the Spice-commits
mailing list