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

Commit c0e9ae39 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Assert if alarm callback is null"

parents 9d649d22 970b2564
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -561,11 +561,16 @@ static void alarm_ready_generic(alarm_t* alarm,
  if (alarm == NULL) {
    return;  // The alarm was probably canceled
  }

  //
  // If the alarm is not periodic, we've fully serviced it now, and can reset
  // some of its internal state. This is useful to distinguish between expired
  // alarms and active ones.
  //
  if (!alarm->callback) {
    LOG(FATAL) << __func__
               << ": timer callback is NULL! Name=" << alarm->stats.name;
  }
  alarm_callback_t callback = alarm->callback;
  void* data = alarm->data;
  uint64_t deadline_ms = alarm->deadline_ms;