Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Commit

Permalink
Fix an issue where irq_handler() tried to invoke a missing function
Browse files Browse the repository at this point in the history
  • Loading branch information
Daisuke Baba committed Jul 6, 2016
1 parent 61cf955 commit 4eb77ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/SerialBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ void SerialBase::attach(void (*fptr)(void), IrqType type) {

void SerialBase::_irq_handler(uint32_t id, SerialIrq irq_type) {
SerialBase *handler = (SerialBase*)id;
handler->_irq[irq_type].call();
if (handler->_irq[irq_type]) {
handler->_irq[irq_type].call();
}
}

int SerialBase::_base_getc() {
Expand Down

0 comments on commit 4eb77ad

Please sign in to comment.