diff options
author | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-01-02 12:10:14 -0500 |
---|---|---|
committer | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-01-02 12:10:14 -0500 |
commit | fe20a273bb3979d9e806d828486633249d073ede (patch) | |
tree | 8927587678803ad8628087e4c52f6dd30927a5d1 /src/isotp/send.c | |
parent | 482c7eafcb35a4031ab6f2241b14ac495735b7cd (diff) |
Avoid hitting a NULL pointer when using callbacks.
Diffstat (limited to 'src/isotp/send.c')
-rw-r--r-- | src/isotp/send.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/isotp/send.c b/src/isotp/send.c index 6cce5c92..85e35744 100644 --- a/src/isotp/send.c +++ b/src/isotp/send.c @@ -6,7 +6,9 @@ void isotp_complete_send(IsoTpShims* shims, IsoTpMessage* message, bool status, IsoTpMessageSentHandler callback) { - callback(message, status); + if(callback != NULL) { + callback(message, status); + } } IsoTpHandle isotp_send_single_frame(IsoTpShims* shims, IsoTpMessage* message, |