summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r--generic/tclIO.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 58c7b3c..6bf28a1 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -2311,6 +2311,9 @@ static void
PreserveChannelBuffer(
ChannelBuffer *bufPtr)
{
+ if (bufPtr->refCount == 0) {
+ Tcl_Panic("Reuse of ChannelBuffer!");
+ }
bufPtr->refCount++;
}