mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Add an assertion to tor_libevent_get_base()
Closes ticket 18241.
This commit is contained in:
parent
5da517e689
commit
c595f6d25e
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 *,
|
MOCK_IMPL(struct event_base *,
|
||||||
tor_libevent_get_base, (void))
|
tor_libevent_get_base, (void))
|
||||||
{
|
{
|
||||||
|
tor_assert(the_event_base != NULL);
|
||||||
return the_event_base;
|
return the_event_base;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user