digital_input: check for valid callback not name! (#4575)

This commit is contained in:
Andrey G 2022-09-14 01:02:00 +03:00 committed by GitHub
parent 68ee1c6a1f
commit f5a4cfc06f
1 changed files with 1 additions and 1 deletions

View File

@ -184,7 +184,7 @@ CH_IRQ_HANDLER(STM32_I2C1_EVENT_HANDLER) {
if (timestamp != 0) { if (timestamp != 0) {
auto& channel = channels[entry.Channel]; auto& channel = channels[entry.Channel];
if (channel.Name) { if (channel.Callback) {
channel.Callback(channel.CallbackData, timestamp); channel.Callback(channel.CallbackData, timestamp);
} }
} else { } else {