From 95f95b258ba6b6ddec3a1bd933815a124bebb8c2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 9 Jan 2011 04:16:36 +0000 Subject: Don't access type stuff when type annotations are not requested. git-svn-id: http://svn.drobilla.net/resp/trunk@403 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- src/pprint.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pprint.cpp b/src/pprint.cpp index be0a840..dd42d8b 100644 --- a/src/pprint.cpp +++ b/src/pprint.cpp @@ -177,7 +177,7 @@ print_to(ostream& out, const AST* ast, unsigned indent, CEnv* cenv, bool types) // Print prototype (possibly with parameter type annotations) const ATuple* pat = (*i++)->as_tuple(); out << "("; - const ATuple* type = cenv->type(tup)->to_tuple(); + const ATuple* type = types ? cenv->type(tup)->to_tuple() : NULL; const ATuple* protT = type ? type->prot() : NULL; print_list_one_line(out, pat, pat->begin(), indent + 2, cenv, types, protT); -- cgit v1.2.1