diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-05-01 10:47:44 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-05-01 10:47:44 -0400 |
commit | bbf0b92b1c03e1d5e132aebd4e2a06c9d78557af (patch) | |
tree | 6b3ed13b845dbe35b4ee9820c144e3a03ba6aa29 /src/or/main.c | |
parent | 9ece027d6065e09743ac875aa873bf23583c133f (diff) | |
download | tor-bbf0b92b1c03e1d5e132aebd4e2a06c9d78557af.tar.gz tor-bbf0b92b1c03e1d5e132aebd4e2a06c9d78557af.zip |
Fix an assertion failure introduced by #25948
Apparently, we can decide our state is dirty before we create the
event to tell the mainloop that we should save it. That's not a
problem, except for the assertion failure.
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/main.c b/src/or/main.c index 1160f377e4..b5ddfe6f23 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -2022,7 +2022,10 @@ save_state_callback(time_t now, const or_options_t *options) void reschedule_or_state_save(void) { - tor_assert(save_state_event); + if (save_state_event == NULL) { + /* This can happen early on during startup. */ + return; + } periodic_event_reschedule(save_state_event); } |