From e39dc76884644dc567c7f0032f7d3dc792502c84 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 16 Mar 2011 21:05:40 -0400 Subject: [PATCH] gc: fix crash when using -u R=ken2 CC=golang-dev https://golang.org/cl/4278056 --- src/cmd/gc/typecheck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/gc/typecheck.c b/src/cmd/gc/typecheck.c index a9389bb962..b4fd55f5df 100644 --- a/src/cmd/gc/typecheck.c +++ b/src/cmd/gc/typecheck.c @@ -1311,7 +1311,7 @@ ret: // TODO(rsc): should not need to check importpkg, // but reflect mentions unsafe.Pointer. - if(safemode && !incannedimport && !importpkg && t->etype == TUNSAFEPTR) + if(safemode && !incannedimport && !importpkg && t && t->etype == TUNSAFEPTR) yyerror("cannot use unsafe.Pointer"); evconst(n); -- 2.50.0