From 3de9162c7e8eb6a10322dfdae6a6a2b0f7e76b11 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Sat, 4 Sep 2021 09:42:45 -0700 Subject: [PATCH] handle null more gracefully --- src/sat/smt/euf_solver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sat/smt/euf_solver.h b/src/sat/smt/euf_solver.h index 3bf4d701ac6..218c605e6cd 100644 --- a/src/sat/smt/euf_solver.h +++ b/src/sat/smt/euf_solver.h @@ -351,7 +351,7 @@ namespace euf { euf::enode* e_internalize(expr* e); euf::enode* mk_enode(expr* e, unsigned n, enode* const* args) { return m_egraph.mk(e, m_generation, n, args); } expr* bool_var2expr(sat::bool_var v) const { return m_bool_var2expr.get(v, nullptr); } - expr_ref literal2expr(sat::literal lit) const { expr* e = bool_var2expr(lit.var()); return lit.sign() ? expr_ref(m.mk_not(e), m) : expr_ref(e, m); } + expr_ref literal2expr(sat::literal lit) const { expr* e = bool_var2expr(lit.var()); return (e && lit.sign()) ? expr_ref(m.mk_not(e), m) : expr_ref(e, m); } unsigned generation() const { return m_generation; } sat::literal attach_lit(sat::literal lit, expr* e);