summary refs log tree commit diff
path: root/libnm-glib/nm-client.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2015-07-14 19:38:58 +0200
committerMichael Biebl <biebl@debian.org>2015-07-14 19:38:58 +0200
commit50a58f0fabd8a34c1b6108a107e08abe3c1ccd24 (patch)
tree6790165f39daee79e2b6c6617483320613493367 /libnm-glib/nm-client.c
parentf408e27bccfacf347605a8d98649975a68f38a17 (diff)
Imported Upstream version 1.0.4 upstream/1.0.4
Diffstat (limited to 'libnm-glib/nm-client.c')
-rw-r--r--libnm-glib/nm-client.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libnm-glib/nm-client.c b/libnm-glib/nm-client.c
index d62a8b63..40add09c 100644
--- a/libnm-glib/nm-client.c
+++ b/libnm-glib/nm-client.c
@@ -782,8 +782,9 @@ nm_client_deactivate_connection (NMClient *client, NMActiveConnection *active)
 	                        DBUS_TYPE_G_OBJECT_PATH, path,
 	                        G_TYPE_INVALID,
 	                        G_TYPE_INVALID)) {
-		g_warning ("Could not deactivate connection '%s': %s", path, error->message);
-		g_error_free (error);
+		g_warning ("Could not deactivate connection '%s': %s", 
+		           path, error ? error->message : "(unknown)");
+		g_clear_error (&error);
 	}
 }
 
@@ -1094,8 +1095,9 @@ nm_client_networking_set_enabled (NMClient *client, gboolean enable)
 	                        G_TYPE_BOOLEAN, enable,
 	                        G_TYPE_INVALID,
 	                        G_TYPE_INVALID)) {
-		g_warning ("Error enabling/disabling networking: %s", err->message);
-		g_error_free (err);
+		g_warning ("Error enabling/disabling networking: %s",
+		           err ? err->message : "(unknown)");
+		g_clear_error (&err);
 	}
 }