From 2d296afc4228c5dc34d6e4c1f09d08cffdb37313 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Wed, 28 May 2003 00:13:42 +0000 Subject: bugfix svn:r297 --- src/or/circuit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/or') diff --git a/src/or/circuit.c b/src/or/circuit.c index 3d190de39..e3e42dbd5 100644 --- a/src/or/circuit.c +++ b/src/or/circuit.c @@ -554,13 +554,13 @@ void circuit_about_to_close_connection(connection_t *conn) { circ->n_streams = conn->next_stream; goto send_end; } - for(prevconn = circ->p_streams; prevconn->next_stream && prevconn->next_stream != conn; prevconn = prevconn->next_stream) ; - if(prevconn->next_stream) { + for(prevconn = circ->p_streams; prevconn && prevconn->next_stream && prevconn->next_stream != conn; prevconn = prevconn->next_stream) ; + if(prevconn && prevconn->next_stream) { prevconn->next_stream = conn->next_stream; goto send_end; } - for(prevconn = circ->n_streams; prevconn->next_stream && prevconn->next_stream != conn; prevconn = prevconn->next_stream) ; - if(prevconn->next_stream) { + for(prevconn = circ->n_streams; prevconn && prevconn->next_stream && prevconn->next_stream != conn; prevconn = prevconn->next_stream) ; + if(prevconn && prevconn->next_stream) { prevconn->next_stream = conn->next_stream; goto send_end; } -- cgit v1.2.3