summaryrefslogtreecommitdiffstats
path: root/generic/tclIOCmd.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-02-11 15:20:37 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-02-11 15:20:37 (GMT)
commitfaf1d78f0e68dafb8c624ca8f5ddcfafbbe7e775 (patch)
treecf57475166d9cecb053a312208812e190dbf581f /generic/tclIOCmd.c
parenta80d0318d2c6fdaaad538515154acc68edfe3bbc (diff)
downloadtcl-faf1d78f0e68dafb8c624ca8f5ddcfafbbe7e775.zip
tcl-faf1d78f0e68dafb8c624ca8f5ddcfafbbe7e775.tar.gz
tcl-faf1d78f0e68dafb8c624ca8f5ddcfafbbe7e775.tar.bz2
[Bug 2949740]: Do not try to put a NULL pipeline channel into binary mode.
Diffstat (limited to 'generic/tclIOCmd.c')
-rw-r--r--generic/tclIOCmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c
index 36ac04b..f2078f0 100644
--- a/generic/tclIOCmd.c
+++ b/generic/tclIOCmd.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIOCmd.c,v 1.65 2009/11/18 21:59:50 nijtmans Exp $
+ * RCS: @(#) $Id: tclIOCmd.c,v 1.66 2010/02/11 15:20:37 dkf Exp $
*/
#include "tclInt.h"
@@ -1171,7 +1171,7 @@ Tcl_OpenObjCmd(
break;
}
chan = Tcl_OpenCommandChannel(interp, cmdObjc, cmdArgv, flags);
- if (binary) {
+ if (binary && chan) {
Tcl_SetChannelOption(interp, chan, "-translation", "binary");
}
}