summaryrefslogtreecommitdiff
path: root/clients
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2014-09-22 12:09:51 +0200
committerJiří Klimeš <jklimes@redhat.com>2014-09-22 12:25:20 +0200
commitb0b51ec5ef0f3cfe0be15ea08aba5814afa14396 (patch)
tree3bf463e5feac8e26bedd640db1f25770dccde4d6 /clients
parentefd09845c41e08469d6f6bffa23bd90b6bd06e85 (diff)
downloadNetworkManager-b0b51ec5ef0f3cfe0be15ea08aba5814afa14396.tar.gz
tui: don't call g_strv_length() on NULL
GLib-CRITICAL **: g_strv_length: assertion `str_array != NULL' failed
Diffstat (limited to 'clients')
-rw-r--r--clients/tui/nmt-address-list.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/clients/tui/nmt-address-list.c b/clients/tui/nmt-address-list.c
index ea775f534a..42873c521f 100644
--- a/clients/tui/nmt-address-list.c
+++ b/clients/tui/nmt-address-list.c
@@ -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;