From f7d23ae7460f87966eade554e364c6f86b1c9062 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Fri, 1 Nov 2002 18:51:22 +0000 Subject: [PATCH] Prevent another segfault. Oops. [originally from svn r2178] --- unix/uxplink.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unix/uxplink.c b/unix/uxplink.c index dab69475..6c5b5544 100644 --- a/unix/uxplink.c +++ b/unix/uxplink.c @@ -111,6 +111,9 @@ void try_output(int is_stderr) void *senddata; int sendlen, ret; + if (bufchain_size(chain) == 0) + return; + bufchain_prefix(chain, &senddata, &sendlen); ret = write(fd, senddata, sendlen); if (ret > 0)