Add assert to ensure non-null dep_stream

This commit is contained in:
Tatsuhiro Tsujikawa 2014-11-08 23:13:14 +09:00
parent 2ba9a009fe
commit efa344be98
1 changed files with 4 additions and 0 deletions

View File

@ -613,6 +613,8 @@ int nghttp2_session_reprioritize_stream
return rv;
}
assert(dep_stream);
if(nghttp2_stream_dep_subtree_find(stream, dep_stream)) {
DEBUGF(fprintf(stderr,
"stream: cycle detected, dep_stream(%p)=%d "
@ -879,6 +881,8 @@ nghttp2_stream* nghttp2_session_open_stream(nghttp2_session *session,
for those which have upload data. Currently, we just track
everything. */
assert(dep_stream);
root_stream = nghttp2_stream_get_dep_root(dep_stream);
if(root_stream->num_substreams < NGHTTP2_MAX_DEP_TREE_LENGTH) {