- //find service for notified char path
- for (l = conn_info->gatt_list_services; l != NULL; l = g_slist_next(l)) {
- svc_info = (hal_gattc_service_t*)l->data;
- if (svc_info == NULL)
- continue;
-
- /* find characteristic object path */
- for (k = svc_info->gatt_list_chars; k != NULL; k = g_slist_next(k)) {
- char_info = (hal_gattc_char_t *)k->data;
- if (char_info == NULL)
+ if (conn_info != NULL) {
+ //find service for notified char path
+ for (l = conn_info->gatt_list_services; l != NULL; l = g_slist_next(l)) {
+ svc_info = (hal_gattc_service_t*)l->data;
+ if (svc_info == NULL)