summaryrefslogtreecommitdiff
path: root/libnm-glib/nm-dhcp6-config.c
diff options
context:
space:
mode:
authorPhilip Withnall <withnall@endlessm.com>2017-02-14 12:43:37 +0000
committerThomas Haller <thaller@redhat.com>2017-02-15 16:30:13 +0100
commit78058f780904d38359165cec11d7ee0735b7addb (patch)
tree98a0ec25d025b065811ee5e27378ba4ffe2fbe31 /libnm-glib/nm-dhcp6-config.c
parent84c484ed5b5d40ff42029140dc7b0a20d794ff46 (diff)
downloadNetworkManager-78058f780904d38359165cec11d7ee0735b7addb.tar.gz
libnm-glib: add some missing precondition assertions
To validate the connection and path for NmObject subclass instances. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=778610
Diffstat (limited to 'libnm-glib/nm-dhcp6-config.c')
-rw-r--r--libnm-glib/nm-dhcp6-config.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libnm-glib/nm-dhcp6-config.c b/libnm-glib/nm-dhcp6-config.c
index 43aee15c7c..aebea8df6a 100644
--- a/libnm-glib/nm-dhcp6-config.c
+++ b/libnm-glib/nm-dhcp6-config.c
@@ -174,6 +174,9 @@ nm_dhcp6_config_class_init (NMDHCP6ConfigClass *config_class)
GObject *
nm_dhcp6_config_new (DBusGConnection *connection, const char *object_path)
{
+ g_return_val_if_fail (connection != NULL, NULL);
+ g_return_val_if_fail (object_path != NULL, NULL);
+
return (GObject *) g_object_new (NM_TYPE_DHCP6_CONFIG,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, object_path,