diff --git a/src/lib/ares_event_thread.c b/src/lib/ares_event_thread.c index 6dd7b502..3fdfe6b8 100644 --- a/src/lib/ares_event_thread.c +++ b/src/lib/ares_event_thread.c @@ -309,7 +309,7 @@ static void ares_event_thread_destroy_int(ares_event_thread_t *e) ares__htable_asvp_destroy(e->ev_handles); e->ev_handles = NULL; - if (e->ev_sys->destroy) { + if (e->ev_sys && e->ev_sys->destroy) { e->ev_sys->destroy(e); }