]> granicus.if.org Git - apache/commitdiff
fix for null connection states
authorStefan Eissing <icing@apache.org>
Mon, 26 Oct 2015 13:48:13 +0000 (13:48 +0000)
committerStefan Eissing <icing@apache.org>
Mon, 26 Oct 2015 13:48:13 +0000 (13:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1710597 13f79535-47bb-0310-9956-ffa450edef68

modules/http2/h2_conn.c

index 816801c3361ef39b9288d9a5284973360ef24e70..b246f87a3199cb3ce824df7b034d94f42d5c5aff 100644 (file)
@@ -283,11 +283,15 @@ static apr_status_t h2_conn_loop(h2_session *session)
          */
         got_streams = !h2_stream_set_is_empty(session->streams);
         if (!got_streams || session->frames_received <= 1) {
-            session->c->cs->state = CONN_STATE_WRITE_COMPLETION;
+            if (session->c->cs) {
+                session->c->cs->state = CONN_STATE_WRITE_COMPLETION;
+            }
             status = h2_session_read(session, APR_BLOCK_READ);
         }
         else {
-            session->c->cs->state = CONN_STATE_HANDLER;
+            if (session->c->cs) {
+                session->c->cs->state = CONN_STATE_HANDLER;
+            }
             status = h2_session_read(session, APR_NONBLOCK_READ);
         }