e17: connman: ipv4_method can be NULL

Fix segv: properties can be NULL, so it's not a good thing to use with
strcmp.



SVN revision: 57948
This commit is contained in:
Lucas De Marchi 2011-03-21 23:37:13 +00:00
parent bba300c20a
commit 37db64a949
1 changed files with 1 additions and 1 deletions

View File

@ -354,7 +354,7 @@ _connman_service_changed(void *data,
GSTR(security, e_connman_service_security_get);
GSTR(ipv4_method, e_connman_service_ipv4_configuration_method_get);
if (strcmp(service->ipv4_method, "dhcp") == 0)
if (service->ipv4_method && strcmp(service->ipv4_method, "dhcp") == 0)
{
GSTR(ipv4_address, e_connman_service_ipv4_address_get);
GSTR(ipv4_netmask, e_connman_service_ipv4_netmask_get);