summaryrefslogtreecommitdiff
path: root/src/socketengine_kqueue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/socketengine_kqueue.cpp')
-rw-r--r--src/socketengine_kqueue.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/socketengine_kqueue.cpp b/src/socketengine_kqueue.cpp
index cad88d393..ed26faa27 100644
--- a/src/socketengine_kqueue.cpp
+++ b/src/socketengine_kqueue.cpp
@@ -150,7 +150,8 @@ int KQueueEngine::DispatchEvents()
* Unlike smelly epoll and select, where we have to getsockopt
* to get the error, this saves us time and cpu cycles. Go BSD!
*/
- ref[ke_list[j].ident]->HandleEvent(EVENT_ERROR, ke_list[j].fflags);
+ if (ref[ke_list[j].ident])
+ ref[ke_list[j].ident]->HandleEvent(EVENT_ERROR, ke_list[j].fflags);
continue;
}
if (ke_list[j].flags & EVFILT_WRITE)