Fixed crash on exit in tr_utpPacket (#4348)

This commit is contained in:
Cœur 2022-12-14 06:51:54 +08:00 committed by GitHub
parent 2f6315b649
commit 4a80f800a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -214,7 +214,7 @@ static void event_callback(evutil_socket_t s, [[maybe_unused]] short type, void*
}
else
{
if (session->allowsUTP())
if (session->allowsUTP() && session->utp_context)
{
if (!tr_utpPacket(std::data(buf), rc, (struct sockaddr*)&from, fromlen, session))
{