]> granicus.if.org Git - libevent/commitdiff
add a check that base != NULL for threading; might want to drop this later
authorNiels Provos <provos@gmail.com>
Mon, 31 Mar 2008 00:31:53 +0000 (00:31 +0000)
committerNiels Provos <provos@gmail.com>
Mon, 31 Mar 2008 00:31:53 +0000 (00:31 +0000)
svn:r696

evthread-internal.h

index edc604bcc763fc1f536ec0d5bcaf21ccd356fb2b..abc0c98d3dfb64446d7fe6868f5f5d8f155fabd6 100644 (file)
@@ -36,7 +36,7 @@ extern "C" {
 struct event_base;
 #ifndef DISABLE_THREAD_SUPPORT
 #define EVTHREAD_USE_LOCKS(base) \
-       ((base)->th_lock != NULL)
+       (base != NULL && (base)->th_lock != NULL)
 
 #define EVTHREAD_IN_THREAD(base) \
        ((base)->th_get_id == NULL || \