summaryrefslogtreecommitdiff
path: root/trans
diff options
context:
space:
mode:
Diffstat (limited to 'trans')
-rw-r--r--trans/streamio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/trans/streamio.c b/trans/streamio.c
index 13714239..c1acc8a2 100644
--- a/trans/streamio.c
+++ b/trans/streamio.c
@@ -104,6 +104,8 @@ buffer_writable (struct buffer *b)
extern inline void
clear_buffer (struct buffer *b)
{
+ if (b == 0)
+ return;
b->head = b->tail = b->buf;
condition_broadcast (b->wait);
}