aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-01-09 04:16:36 +0000
committerDavid Robillard <d@drobilla.net>2011-01-09 04:16:36 +0000
commit95f95b258ba6b6ddec3a1bd933815a124bebb8c2 (patch)
treefab3c9c889d6502778b2955ead40241fa8c59ba1
parent9bf97f9ed8cca131284c214909c2730bdb3b96b1 (diff)
downloadresp-95f95b258ba6b6ddec3a1bd933815a124bebb8c2.tar.gz
resp-95f95b258ba6b6ddec3a1bd933815a124bebb8c2.tar.bz2
resp-95f95b258ba6b6ddec3a1bd933815a124bebb8c2.zip
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
-rw-r--r--src/pprint.cpp2
1 files changed, 1 insertions, 1 deletions
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);