diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-11-16 12:06:40 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-11-16 12:06:40 -0500 |
commit | 1fda4928781d155dcef8c5ae158418bf8ee928ff (patch) | |
tree | 541814dc616e439c5672d6404ba2678f3343eafe /event.c | |
parent | 7afbd60266372af1f73d401127832983230ab420 (diff) | |
parent | e3cccf380c23891089d7c3a4637cac50010a600d (diff) | |
download | libevent-1fda4928781d155dcef8c5ae158418bf8ee928ff.tar.gz |
Merge remote-tracking branch 'origin/patches-2.0'
Diffstat (limited to 'event.c')
-rw-r--r-- | event.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -2020,6 +2020,11 @@ event_pending(const struct event *ev, short event, struct timeval *tv) { int flags = 0; + if (EVUTIL_FAILURE_CHECK(ev->ev_base == NULL)) { + event_warnx("%s: event has no event_base set.", __func__); + return 0; + } + EVBASE_ACQUIRE_LOCK(ev->ev_base, th_base_lock); event_debug_assert_is_setup_(ev); |