aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/chan.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/chan.c')
-rw-r--r--src/pkg/runtime/chan.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pkg/runtime/chan.c b/src/pkg/runtime/chan.c
index cc056f65f1..475da233c1 100644
--- a/src/pkg/runtime/chan.c
+++ b/src/pkg/runtime/chan.c
@@ -1052,6 +1052,9 @@ runtime·closechan(Hchan *c)
SudoG *sg;
G* gp;
+ if(c == nil)
+ runtime·panicstring("close of nil channel");
+
if(runtime·gcwaiting)
runtime·gosched();