Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6cf0ccf7 authored by Qasim Javed's avatar Qasim Javed
Browse files

Add a nullptr check.

Bug: 230023004
Test: builds
Tag: #gd-refactor

Change-Id: I5d0a8a1e96bbe056c3bb2bca1918c2856b893380
parent d6c6f8f7
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -114,6 +114,11 @@ static void l2c_csm_indicate_connection_open(tL2C_CCB* p_ccb) {
 *
 ******************************************************************************/
void l2c_csm_execute(tL2C_CCB* p_ccb, tL2CEVT event, void* p_data) {
  if (p_ccb == nullptr) {
    LOG_WARN("CCB is null for event (%d)", event);
    return;
  }

  if (!l2cu_is_ccb_active(p_ccb)) {
    LOG_WARN("CCB not in use, event (%d) cannot be processed", event);
    return;