Skip to content

Commit a386819

Browse files
committed
Merge pull request #131 from c1728p9/fix_serial_callbacks
Update Callback to fix fault in serial interrupts
2 parents 7ed00a0 + e37e1da commit a386819

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hal/api/Callback.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,9 @@ class Callback<R()> {
796796
/** Call the attached function
797797
*/
798798
R call() {
799+
if (NULL == _thunk) {
800+
return (R)0;
801+
}
799802
return _thunk(_obj, &_func);
800803
}
801804

0 commit comments

Comments
 (0)