summaryrefslogtreecommitdiff
path: root/event.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-11-16 12:06:40 -0500
committerNick Mathewson <nickm@torproject.org>2012-11-16 12:06:40 -0500
commit1fda4928781d155dcef8c5ae158418bf8ee928ff (patch)
tree541814dc616e439c5672d6404ba2678f3343eafe /event.c
parent7afbd60266372af1f73d401127832983230ab420 (diff)
parente3cccf380c23891089d7c3a4637cac50010a600d (diff)
downloadlibevent-1fda4928781d155dcef8c5ae158418bf8ee928ff.tar.gz
Merge remote-tracking branch 'origin/patches-2.0'
Diffstat (limited to 'event.c')
-rw-r--r--event.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/event.c b/event.c
index 8963e22e..fc3ceef5 100644
--- a/event.c
+++ b/event.c
@@ -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);