diff options
Diffstat (limited to 'error_buffer.go')
-rw-r--r-- | error_buffer.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/error_buffer.go b/error_buffer.go index 8c240e26..78effc9b 100644 --- a/error_buffer.go +++ b/error_buffer.go @@ -47,7 +47,9 @@ func (eb *errBuffer) Write(p []byte) (int, error) { eb.buf = append(eb.buf, p...) for msg := eb.fetchMsg(); msg != nil; msg = eb.fetchMsg() { - eb.lsn(EventStderrOutput, msg) + if eb.lsn != nil { + eb.lsn(EventStderrOutput, msg) + } } return len(p), nil |