summaryrefslogtreecommitdiff
path: root/libnm-util/nm-connection.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2013-11-07 19:29:00 +0100
committerThomas Haller <thaller@redhat.com>2013-11-07 19:30:38 +0100
commit03943e2854c297526077dac91913f11e2f6780b2 (patch)
treef03bd0b88d9c0a53449b48fed44cd6015e796716 /libnm-util/nm-connection.c
parenta31dfea05267f761a299d0fd24581a9e5feb58bb (diff)
downloadNetworkManager-03943e2854c297526077dac91913f11e2f6780b2.tar.gz
trivial: make nm_connection_dump more forgiving when passing NULL
nm_connection_dump is mainly used for printf debugging, so no need about being overly critical about not accepting NULL. Just don't dump anything. Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'libnm-util/nm-connection.c')
-rw-r--r--libnm-util/nm-connection.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libnm-util/nm-connection.c b/libnm-util/nm-connection.c
index fec2950964..7e588aeec1 100644
--- a/libnm-util/nm-connection.c
+++ b/libnm-util/nm-connection.c
@@ -1005,7 +1005,8 @@ nm_connection_dump (NMConnection *connection)
const char *setting_name;
char *str;
- g_return_if_fail (NM_IS_CONNECTION (connection));
+ if (!connection)
+ return;
g_hash_table_iter_init (&iter, NM_CONNECTION_GET_PRIVATE (connection)->settings);
while (g_hash_table_iter_next (&iter, (gpointer) &setting_name, (gpointer) &setting)) {