From 39329809dd04882f2ead772e02653cac078e1ad2 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Tue, 21 Aug 2012 16:35:31 -0700 Subject: [PATCH] fix crash with malformed program --- expr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/expr.cpp b/expr.cpp index 436d9e8e..c57015ab 100644 --- a/expr.cpp +++ b/expr.cpp @@ -2823,7 +2823,7 @@ AssignExpr::TypeCheck() { if (CastType(lvalueType) == NULL || (ftype = CastType(lvalueType->GetBaseType())) == NULL) { Error(lvalue->pos, "Can't assign function pointer to type \"%s\".", - lvalue->GetType()->GetString().c_str()); + lvalueType ? lvalueType->GetString().c_str() : ""); return NULL; }