mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 14:51:11 +01:00
Add an assertion to tor_libevent_get_base()
Closes ticket 18241.
This commit is contained in:
parent
5da517e689
commit
c595f6d25e
2 changed files with 6 additions and 0 deletions
5
changes/assert_event_base
Normal file
5
changes/assert_event_base
Normal file
|
@ -0,0 +1,5 @@
|
|||
o Minor features (robustness):
|
||||
- Exit immediately with an error message if the code attempts to
|
||||
use libevent without having initialized it. This should resolve
|
||||
some frequently-made mistakes in our unit tests. Closes ticket
|
||||
18241.
|
|
@ -247,6 +247,7 @@ tor_libevent_initialize(tor_libevent_cfg *torcfg)
|
|||
MOCK_IMPL(struct event_base *,
|
||||
tor_libevent_get_base, (void))
|
||||
{
|
||||
tor_assert(the_event_base != NULL);
|
||||
return the_event_base;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue