From aba6eafcd6c1204f82f6231d104023d7904489f5 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 17 Dec 2012 13:42:52 +0200 Subject: [PATCH] core: Fix loading devices without any SDP records --- src/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device.c b/src/device.c index fbfbe1084..2c6f8bbce 100644 --- a/src/device.c +++ b/src/device.c @@ -4022,7 +4022,7 @@ static sdp_list_t *read_device_records(struct btd_device *device) g_key_file_load_from_file(key_file, filename, 0, NULL); keys = g_key_file_get_keys(key_file, "ServiceRecords", NULL, NULL); - for (handle = keys; *handle; handle++) { + for (handle = keys; handle && *handle; handle++) { str = g_key_file_get_string(key_file, "ServiceRecords", *handle, NULL); if (!str) -- 2.47.3