summaryrefslogtreecommitdiffstats
path: root/generic/tclIORChan.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-08-13 16:45:03 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-08-13 16:45:03 (GMT)
commit13850d4952b34d30e3e2ae68c3cb2c10c0019737 (patch)
treedfd44064802e11ed2634e08abcd57c3cef837ae4 /generic/tclIORChan.c
parent1db16b915a2fc6e315586502121d1ab7c9b39a59 (diff)
downloadtcl-13850d4952b34d30e3e2ae68c3cb2c10c0019737.zip
tcl-13850d4952b34d30e3e2ae68c3cb2c10c0019737.tar.gz
tcl-13850d4952b34d30e3e2ae68c3cb2c10c0019737.tar.bz2
A bit of code safety, and then a test demonstrating next issue.
Diffstat (limited to 'generic/tclIORChan.c')
-rw-r--r--generic/tclIORChan.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c
index 6592f9e..85a35b8 100644
--- a/generic/tclIORChan.c
+++ b/generic/tclIORChan.c
@@ -753,8 +753,11 @@ CallNotify(
int flags)
{
PostEvent *pevPtr = (PostEvent *)evPtr;
+ Channel *chanPtr = (Channel *)pevPtr->chan;
- Tcl_NotifyChannel(pevPtr->chan, pevPtr->events);
+ if (chanPtr->typePtr != NULL) {
+ Tcl_NotifyChannel(pevPtr->chan, pevPtr->events);
+ }
TclChannelRelease(pevPtr->chan);
return 1;
}