diff options
author | Thomas Haller <thaller@redhat.com> | 2013-11-07 19:29:00 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2013-11-07 19:30:38 +0100 |
commit | 03943e2854c297526077dac91913f11e2f6780b2 (patch) | |
tree | f03bd0b88d9c0a53449b48fed44cd6015e796716 | |
parent | a31dfea05267f761a299d0fd24581a9e5feb58bb (diff) | |
download | NetworkManager-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>
-rw-r--r-- | libnm-util/nm-connection.c | 3 |
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)) { |