http request cleanup crash fix.

This commit is contained in:
Cory McWilliams 2024-03-18 16:24:14 +00:00
parent 9d0f6ec155
commit c32e1b9583

View File

@ -175,7 +175,7 @@ static void _http_connection_destroy(tf_http_connection_t* connection, const cha
if (connection->request)
{
_http_request_destroy(connection->request);
if (connection->request->ref_count == 0)
if (connection->request && connection->request->ref_count == 0)
{
tf_free(connection->request);
}