From 49f34a018f0ecfd8b709632a0115d7babd9bf784 Mon Sep 17 00:00:00 2001 From: Patrik Flykt Date: Thu, 12 Apr 2012 12:54:32 +0300 Subject: service: Check for settings list being non-NULL --- src/service.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/service.c b/src/service.c index c51f5987..bfd8c7ed 100644 --- a/src/service.c +++ b/src/service.c @@ -5627,7 +5627,8 @@ struct connman_service * __connman_service_create_from_network(struct connman_ne auto_connect_types = connman_setting_get_uint_list("DefaultAutoConnectTechnologies"); service->autoconnect = FALSE; - for (i = 0; auto_connect_types[i] != 0; i += 1) { + for (i = 0; auto_connect_types != NULL && + auto_connect_types[i] != 0; i++) { if (service->type == auto_connect_types[i]) { service->autoconnect = TRUE; break; -- cgit v1.2.3