From 7abe1d85ce99ad9aa1db352fee6a519a3a13ff0f Mon Sep 17 00:00:00 2001 From: Anatoli Papirovski Date: Thu, 7 Jun 2018 13:07:59 -0400 Subject: [PATCH] fixup: another segfault --- src/node_http2.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/node_http2.cc b/src/node_http2.cc index 7165d6752e1ef3..534fc845bb60b9 100644 --- a/src/node_http2.cc +++ b/src/node_http2.cc @@ -1787,7 +1787,8 @@ void Http2Stream::Destroy() { // We can destroy the stream now if there are no writes for it // already on the socket. Otherwise, we'll wait for the garbage collector // to take care of cleaning up. - if (!stream->session()->HasWritesOnSocketForStream(stream)) + if (stream->session() == nullptr || + !stream->session()->HasWritesOnSocketForStream(stream)) delete stream; }, this, this->object());