Commit 5c3c16e
committed
Check event delay function before calling it
If no event handler has been set or an event handler has been removed,
the delay function will be NULL. Nevertheless, events may still be sent
by the EC (whether configured to do so or not), so we need to check the
delay function and ensure it is non-NULL before calling it.
In case it is NULL, we assume a delay of zero, forwarding it to the
workq-queue and let the work function take care of logging it as
unhandled event.
Reported by: Blaž Hrastnik <blaz@mxxn.io>1 parent 3ae7719 commit 5c3c16e
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
909 | 909 | | |
910 | 910 | | |
911 | 911 | | |
912 | | - | |
| 912 | + | |
913 | 913 | | |
914 | 914 | | |
915 | 915 | | |
| |||
945 | 945 | | |
946 | 946 | | |
947 | 947 | | |
948 | | - | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
949 | 954 | | |
950 | 955 | | |
951 | 956 | | |
| |||
0 commit comments