Fix: do not crash when asked to configure an impossible event_base

svn:r942
This commit is contained in:
Nick Mathewson 2008-09-26 13:36:15 +00:00
parent b3d6a569e7
commit c97ee898dc

View File

@ -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)