summaryrefslogtreecommitdiff
path: root/event.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-09-26 13:36:15 +0000
committerNick Mathewson <nickm@torproject.org>2008-09-26 13:36:15 +0000
commitc97ee898dca9b1d18cddb0dcc0cf2c9bb3346065 (patch)
treeafc6d6280d2ca253f579c74242bb8dcf879f77d8 /event.c
parentb3d6a569e7a0bee12718b1ff0da6277d470cdf76 (diff)
downloadlibevent-c97ee898dca9b1d18cddb0dcc0cf2c9bb3346065.tar.gz
Fix: do not crash when asked to configure an impossible event_base
svn:r942
Diffstat (limited to 'event.c')
-rw-r--r--event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/event.c b/event.c
index f01354a9..6034ef36 100644
--- a/event.c
+++ b/event.c
@@ -343,7 +343,7 @@ event_base_free(struct event_base *base)
event_debug(("%s: %d events were still set in base",
__func__, n_deleted));
- if (base->evsel->dealloc != NULL)
+ if (base->evsel != NULL && base->evsel->dealloc != NULL)
base->evsel->dealloc(base, base->evbase);
for (i = 0; i < base->nactivequeues; ++i)