In case the server cache does not exist for a specific
connection, the API used to copy the server DB into the
DB structure needs to return immediately. This change
makes sure of that and prevents dereferencing of a null
block causing the runtime error.
Change-Id: Iec3040a1280ef9d80b1b9c76eca8071dff499411
CRs-Fixed:
1040951
if (!p_clcb->p_srcb || p_clcb->p_srcb->p_srvc_list || /* no active discovery */
!p_clcb->p_srcb->p_srvc_cache) {
APPL_TRACE_ERROR("No server cache available");
+ return;
}
bta_gattc_get_gatt_db_impl(p_clcb->p_srcb, start_handle, end_handle, db, count);