From 8a64dcbdae49bce3ba56bb78c67562549bc9cf8c Mon Sep 17 00:00:00 2001 From: Tudor Bosman Date: Fri, 7 Sep 2012 21:46:58 -0700 Subject: [PATCH] Fix InpuByteStreamSplitter in debug mode. Test Plan: stream_test, exception_tracer_test Reviewed By: soren@fb.com FB internal diff: D569476 --- folly/experimental/io/Stream-inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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_) { -- 2.34.1