From 7f0bf534df61f8e0320ac3a69f6c0e75e58d3ccd Mon Sep 17 00:00:00 2001
From: Craig Tiller <ctiller@google.com>
Date: Thu, 29 Sep 2016 10:19:28 -0700
Subject: [PATCH] Fix crash when accepting a stream after shutdown

---
 src/core/ext/transport/chttp2/transport/chttp2_transport.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c
index c25bf1718c..023b7c2e95 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c
@@ -524,6 +524,9 @@ grpc_chttp2_stream *grpc_chttp2_parsing_lookup_stream(grpc_chttp2_transport *t,
 grpc_chttp2_stream *grpc_chttp2_parsing_accept_stream(grpc_exec_ctx *exec_ctx,
                                                       grpc_chttp2_transport *t,
                                                       uint32_t id) {
+  if (t->channel_callback.accept_stream == NULL) {
+    return NULL;
+  }
   grpc_chttp2_stream *accepting;
   GPR_ASSERT(t->accepting_stream == NULL);
   t->accepting_stream = &accepting;
-- 
GitLab