diff options
| author | Michael Biebl <biebl@debian.org> | 2012-06-29 20:12:44 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2012-06-29 20:12:44 +0200 |
| commit | 867254ea7c2b193fecf8cd36cc6e5dc53c290d92 (patch) | |
| tree | 7c698b403882736ab70c3efd524c3460f08c391c /src/settings/plugins/ifnet/net_utils.c | |
| parent | de06e5715e780baade318f3490ac7a4c9ce84e32 (diff) | |
Imported Upstream version 0.9.5.95 upstream/0.9.5.95
Diffstat (limited to 'src/settings/plugins/ifnet/net_utils.c')
| -rw-r--r-- | src/settings/plugins/ifnet/net_utils.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/settings/plugins/ifnet/net_utils.c b/src/settings/plugins/ifnet/net_utils.c index f1687479..d613db6a 100644 --- a/src/settings/plugins/ifnet/net_utils.c +++ b/src/settings/plugins/ifnet/net_utils.c @@ -404,7 +404,7 @@ has_ip6_address (const char *conn_name) g_return_val_if_fail (conn_name != NULL, FALSE); ipset = split_addresses (ifnet_get_data (conn_name, "config")); - length = g_strv_length (ipset); + length = ipset ? g_strv_length (ipset) : 0; for (i = 0; i < length; i++) { if (!is_ip6_address (ipset[i])) continue; @@ -618,7 +618,7 @@ convert_ip4_config_block (const char *conn_name) g_return_val_if_fail (conn_name != NULL, NULL); ipset = split_addresses (ifnet_get_data (conn_name, "config")); - length = g_strv_length (ipset); + length = ipset ? g_strv_length (ipset) : 0; routes = ifnet_get_data (conn_name, "routes"); if (routes) @@ -654,7 +654,7 @@ convert_ip6_config_block (const char *conn_name) g_return_val_if_fail (conn_name != NULL, NULL); ipset = split_addresses (ifnet_get_data (conn_name, "config")); - length = g_strv_length (ipset); + length = ipset ? g_strv_length (ipset) : 0; for (i = 0; i < length; i++) { ip = ipset[i]; ip = strip_string (ip, '"'); @@ -684,7 +684,7 @@ convert_ip4_routes_block (const char *conn_name) g_return_val_if_fail (conn_name != NULL, NULL); ipset = split_routes (ifnet_get_data (conn_name, "routes")); - length = g_strv_length (ipset); + length = ipset ? g_strv_length (ipset) : 0; for (i = 0; i < length; i++) { ip = ipset[i]; if (find_default_gateway_str (ip) || strstr (ip, "::") @@ -718,7 +718,7 @@ convert_ip6_routes_block (const char *conn_name) g_return_val_if_fail (conn_name != NULL, NULL); ipset = split_routes (ifnet_get_data (conn_name, "routes")); - length = g_strv_length (ipset); + length = ipset ? g_strv_length (ipset) : 0; for (i = 0; i < length; i++) { ip = ipset[i]; ip = strip_string (ip, '"'); |