mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-22 11:10:24 +01:00
cli: fix a crash in 'nmcli d l' when no connections available for a device
The regression caused by 1dca1e3c3d
This commit is contained in:
parent
47d8db57b5
commit
5e17df86f4
1 changed files with 1 additions and 1 deletions
|
|
@ -909,7 +909,7 @@ show_device_info (gpointer data, gpointer user_data)
|
|||
/* available-connections */
|
||||
avail_cons = nm_device_get_available_connections (device);
|
||||
ac_paths_str = g_string_new (NULL);
|
||||
if (avail_cons->len) {
|
||||
if (avail_cons && avail_cons->len) {
|
||||
ac_arr = g_new (char *, avail_cons->len + 1);
|
||||
ac_arr[avail_cons->len] = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue