fix crash with malformed program

This commit is contained in:
Matt Pharr
2012-08-21 16:35:31 -07:00
parent 44797e2925
commit 39329809dd

View File

@@ -2823,7 +2823,7 @@ AssignExpr::TypeCheck() {
if (CastType<PointerType>(lvalueType) == NULL ||
(ftype = CastType<FunctionType>(lvalueType->GetBaseType())) == NULL) {
Error(lvalue->pos, "Can't assign function pointer to type \"%s\".",
lvalue->GetType()->GetString().c_str());
lvalueType ? lvalueType->GetString().c_str() : "<unknown>");
return NULL;
}