From 061e68bc77dae947149f531d956a72bc06fe46b4 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Thu, 26 Jan 2012 09:57:13 -0800 Subject: [PATCH] Fix compiler crash from malformed program. --- decl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/decl.cpp b/decl.cpp index 5ec58462..c62f0b6f 100644 --- a/decl.cpp +++ b/decl.cpp @@ -266,7 +266,8 @@ Declarator::GetFunctionInfo(DeclSpecs *ds, std::vector *funArgs) { funArgs->push_back(sym); } - funSym->type = funSym->type->ResolveUnboundVariability(Type::Varying); + if (funSym != NULL) + funSym->type = funSym->type->ResolveUnboundVariability(Type::Varying); return funSym; }