Null check callback function in callbackRequest
Previously, calling callbackRequest(pcallback), where pcallback->callback is NULL, would result in a crash on one of the callback threads.
This commit is contained in:
committed by
mdavidsaver
parent
3fa1932345
commit
f4be9daf4d
@@ -344,6 +344,10 @@ int callbackRequest(epicsCallback *pcallback)
|
||||
epicsInterruptContextMessage("callbackRequest: " ERL_ERROR " pcallback was NULL\n");
|
||||
return S_db_notInit;
|
||||
}
|
||||
if (!pcallback->callback) {
|
||||
epicsInterruptContextMessage("callbackRequest: " ERL_ERROR " pcallback->callback was NULL\n");
|
||||
return S_db_notInit;
|
||||
}
|
||||
priority = pcallback->priority;
|
||||
if (priority < 0 || priority >= NUM_CALLBACK_PRIORITIES) {
|
||||
epicsInterruptContextMessage("callbackRequest: " ERL_ERROR " Bad priority\n");
|
||||
|
||||
Reference in New Issue
Block a user