Commit 5e17df86 authored by Jiří Klimeš's avatar Jiří Klimeš

cli: fix a crash in 'nmcli d l' when no connections available for a device

The regression caused by 1dca1e3c
parent 47d8db57
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment