From c74116aa246decea2e47a7a00f7f0e17b04e31b6 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Fri, 12 Aug 2011 07:47:17 +0100 Subject: [PATCH] Fix crasher with malformed program --- expr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/expr.cpp b/expr.cpp index 22f04101..718abe2b 100644 --- a/expr.cpp +++ b/expr.cpp @@ -2100,7 +2100,8 @@ FunctionCallExpr::tryResolve(bool (*matchFunc)(Expr *, const Type *)) { // It's kind of a silly to redundantly discover this for each // potential match versus detecting this earlier in the // matching process and just giving up. - if (!callArgs[i] || !callArgs[i]->GetType() || !candArgTypes[i]) + if (!callArgs[i] || !callArgs[i]->GetType() || !candArgTypes[i] || + dynamic_cast(callArgs[i]->GetType()) != NULL) return false; // See if this caller argument matches the type of the