diff options
-rw-r--r-- | generic/tclIO.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index 31cb48f..80b646b 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -8638,9 +8638,6 @@ TclCopyChannel( CopyState *csPtr; int nonBlocking = (cmdPtr) ? CHANNEL_NONBLOCKING : 0; - TclChannelPreserve(inChan); - TclChannelPreserve(outChan); - inStatePtr = inPtr->state; outStatePtr = outPtr->state; @@ -8711,6 +8708,9 @@ TclCopyChannel( } csPtr->cmdPtr = cmdPtr; + TclChannelPreserve(inChan); + TclChannelPreserve(outChan); + inStatePtr->csPtrR = csPtr; outStatePtr->csPtrW = csPtr; |