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>
This commit is contained in:
Thomas Haller 2013-11-07 19:29:00 +01:00
parent a31dfea052
commit 03943e2854

View file

@ -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)) {