test: don't crash libnm-glib if there are no devices for an active connection

This commit is contained in:
Richard Hughes 2011-02-18 11:31:45 -06:00 committed by Dan Williams
parent 0b8dd709b0
commit e765fce2b4

View file

@ -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);
}
}