mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-11 01:40:19 +01:00
test: don't crash libnm-glib if there are no devices for an active connection
This commit is contained in:
parent
0b8dd709b0
commit
e765fce2b4
1 changed files with 2 additions and 1 deletions
|
|
@ -320,7 +320,8 @@ test_get_active_connections (NMClient *client)
|
|||
|
||||
g_print (" %s\n", nm_object_get_path (g_ptr_array_index (connections, i)));
|
||||
devices = nm_active_connection_get_devices (g_ptr_array_index (connections, i));
|
||||
g_ptr_array_foreach ((GPtrArray *) devices, show_active_connection_device, NULL);
|
||||
if (devices)
|
||||
g_ptr_array_foreach ((GPtrArray *) devices, show_active_connection_device, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue