summaryrefslogtreecommitdiffstats
path: root/generic/tclIOCmd.c
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2010-02-11 15:25:25 (GMT)
committerdkf <dkf@noemail.net>2010-02-11 15:25:25 (GMT)
commita1ac10d594d444ff31ff1ec2f09806bd1c5ca5e2 (patch)
tree591dec0172a67e8c0620beb1bf7a8c3ca45ef4fd /generic/tclIOCmd.c
parent5fc4c91de6436b4dec91c4e6f7199ca1bf7519c3 (diff)
downloadtcl-a1ac10d594d444ff31ff1ec2f09806bd1c5ca5e2.zip
tcl-a1ac10d594d444ff31ff1ec2f09806bd1c5ca5e2.tar.gz
tcl-a1ac10d594d444ff31ff1ec2f09806bd1c5ca5e2.tar.bz2
[Bug 2949740]: Do not try to put a NULL pipeline channel into binary mode.
FossilOrigin-Name: 2692fb9c43cdd5b738825d6b65e36c8d9650ce33
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 00ca527..dce8ed7 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.51.2.2 2008/04/10 20:55:26 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclIOCmd.c,v 1.51.2.3 2010/02/11 15:25:25 dkf Exp $
*/
#include "tclInt.h"
@@ -1128,7 +1128,7 @@ Tcl_OpenObjCmd(
break;
}
chan = Tcl_OpenCommandChannel(interp, cmdObjc, cmdArgv, flags);
- if (binary) {
+ if (binary && chan) {
Tcl_SetChannelOption(interp, chan, "-translation", "binary");
}
}