fix(kernel/printer): memory access violation when printing contexts

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2013-12-06 15:50:29 -08:00
parent 0390f3c39b
commit 147626c906

View file

@ -181,7 +181,9 @@ static void display_context_core(std::ostream & out, context const & ctx) {
display_context_core(out, tail_ctx); display_context_core(out, tail_ctx);
if (!empty(tail_ctx)) if (!empty(tail_ctx))
out << "; "; out << "; ";
out << head.get_name() << " : " << mk_pair(head.get_domain(), tail_ctx); out << head.get_name();
if (head.get_domain())
out << " : " << mk_pair(head.get_domain(), tail_ctx);
if (head.get_body()) { if (head.get_body()) {
out << " := " << mk_pair(head.get_body(), tail_ctx); out << " := " << mk_pair(head.get_body(), tail_ctx);
} }