diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc index e45e62482b1..dca0ebc1cfc 100644 --- a/proxy/http2/Http2ConnectionState.cc +++ b/proxy/http2/Http2ConnectionState.cc @@ -1183,8 +1183,9 @@ Http2ConnectionState::release_stream(Http2Stream *stream) // We were shutting down, go ahead and terminate the session // this is a member of Http2ConnectionState and will be freed // when ua_session is destroyed - ua_session->destroy(); - + if (ua_session) { + ua_session->destroy(); + } // Can't do this because we just destroyed right here ^, // or we can use a local variable to do it. // ua_session = nullptr;