From: Tudor Bosman Date: Sat, 8 Sep 2012 04:46:58 +0000 (-0700) Subject: Fix InpuByteStreamSplitter in debug mode. X-Git-Tag: v0.22.0~1188 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8a64dcbdae49bce3ba56bb78c67562549bc9cf8c;p=folly.git Fix InpuByteStreamSplitter in debug mode. Test Plan: stream_test, exception_tracer_test Reviewed By: soren@fb.com FB internal diff: D569476 --- diff --git a/folly/experimental/io/Stream-inl.h b/folly/experimental/io/Stream-inl.h index d4a7f3f4..925c1988 100644 --- a/folly/experimental/io/Stream-inl.h +++ b/folly/experimental/io/Stream-inl.h @@ -34,7 +34,7 @@ InputByteStreamSplitter::InputByteStreamSplitter( template bool InputByteStreamSplitter::operator()(ByteRange& chunk) { - DCHECK_EQ(buffer_->length(), 0); + DCHECK(!buffer_ || buffer_->length() == 0); chunk.clear(); if (rest_.empty()) { if (done_) {