aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2020-01-16 10:00:32 +1000
committerteor <teor@torproject.org>2020-01-16 10:00:32 +1000
commit026f068bb3aed9de0f1cc6792f6c9528b7b27db2 (patch)
tree9f636fe012dd0facbe248e93500242ed4158fcca /src/core
parentd96b35d6639b1c2f6a57f9d84007544c334c963b (diff)
parent19954cffd7710ccac778aa5cf15ae1bc6a5d56fa (diff)
downloadtor-026f068bb3aed9de0f1cc6792f6c9528b7b27db2.tar.gz
tor-026f068bb3aed9de0f1cc6792f6c9528b7b27db2.zip
Merge branch 'maint-0.3.5' into maint-0.4.0
Diffstat (limited to 'src/core')
-rw-r--r--src/core/mainloop/mainloop.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/mainloop/mainloop.c b/src/core/mainloop/mainloop.c
index e8de578b67..a42a8acc80 100644
--- a/src/core/mainloop/mainloop.c
+++ b/src/core/mainloop/mainloop.c
@@ -772,6 +772,10 @@ tor_shutdown_event_loop_and_exit(int exitcode)
main_loop_should_exit = 1;
main_loop_exit_value = exitcode;
+ if (! tor_libevent_is_initialized()) {
+ return; /* No event loop to shut down. */
+ }
+
/* Die with an assertion failure in ten seconds, if for some reason we don't
* exit normally. */
/* XXXX We should consider this code if it's never used. */