mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-23 03:50:08 +01:00
tui: don't call g_strv_length() on NULL
GLib-CRITICAL **: g_strv_length: assertion `str_array != NULL' failed
This commit is contained in:
parent
efd09845c4
commit
b0b51ec5ef
1 changed files with 1 additions and 1 deletions
|
|
@ -172,7 +172,7 @@ nmt_address_list_add_clicked (NmtWidgetList *list)
|
|||
NmtAddressListPrivate *priv = NMT_ADDRESS_LIST_GET_PRIVATE (list);
|
||||
int len;
|
||||
|
||||
len = g_strv_length (priv->strings);
|
||||
len = priv->strings ? g_strv_length (priv->strings) : 0;
|
||||
priv->strings = g_renew (char *, priv->strings, len + 2);
|
||||
priv->strings[len] = g_strdup ("");
|
||||
priv->strings[len + 1] = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue