summaryrefslogtreecommitdiff
path: root/gio/gnetworkmonitornm.c
diff options
context:
space:
mode:
authorPhilip Withnall <withnall@endlessm.com>2018-09-13 10:25:05 +0100
committerPhilip Withnall <withnall@endlessm.com>2018-09-13 10:25:05 +0100
commitc5761146bc063a2defd9934cd0151b5e5766ab73 (patch)
tree09613ca2ad70e44f61ed65c5e5d2a8fbaf22a7e2 /gio/gnetworkmonitornm.c
parent5bc35a72459e3413bb096a167a3931a7e3af227d (diff)
downloadglib-c5761146bc063a2defd9934cd0151b5e5766ab73.tar.gz
gnetworkmonitornm: Set a GError properly on an error handling path
All the other initialisation failure paths set a GError, but this one didn’t. Set a GError to avoid breaking the invariant that returning FALSE should always have a GError set. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://gitlab.gnome.org/GNOME/glib/issues/1523
Diffstat (limited to 'gio/gnetworkmonitornm.c')
-rw-r--r--gio/gnetworkmonitornm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gio/gnetworkmonitornm.c b/gio/gnetworkmonitornm.c
index 20a86571f..5bc8c925a 100644
--- a/gio/gnetworkmonitornm.c
+++ b/gio/gnetworkmonitornm.c
@@ -309,6 +309,8 @@ g_network_monitor_nm_initable_init (GInitable *initable,
if (!name_owner)
{
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ _("NetworkManager not running"));
g_object_unref (proxy);
return FALSE;
}