summaryrefslogtreecommitdiff
path: root/libpod/container_attach_linux.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/container_attach_linux.go')
-rw-r--r--libpod/container_attach_linux.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/libpod/container_attach_linux.go b/libpod/container_attach_linux.go
index fc53268c3..17b09fccc 100644
--- a/libpod/container_attach_linux.go
+++ b/libpod/container_attach_linux.go
@@ -145,7 +145,9 @@ func redirectResponseToOutputStreams(outputStream, errorStream io.Writer, writeO
default:
logrus.Infof("Received unexpected attach type %+d", buf[0])
}
-
+ if dst == nil {
+ return errors.New("output destination cannot be nil")
+ }
if doWrite {
nw, ew := dst.Write(buf[1:nr])
if ew != nil {