Commit 7f55c591 authored by Pavan Balaji's avatar Pavan Balaji
Browse files

[svn-r5089] Check to make sure the callback function exists before calling it.

parent 22defdc0
......@@ -160,6 +160,9 @@ HYD_Status HYD_DMX_wait_for_event(int wtime)
if (pollfds[i].revents & POLLIN)
events |= HYD_STDOUT;
if (run->callback == NULL)
HYDU_ERR_POP(status, "no registered callback found for socket\n");
status = run->callback(pollfds[i].fd, events, run->userp);
HYDU_ERR_POP(status, "callback returned error status\n");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment