diff --git a/src/smt/theory_lra.cpp b/src/smt/theory_lra.cpp index 845f28df2..21f70ac8d 100644 --- a/src/smt/theory_lra.cpp +++ b/src/smt/theory_lra.cpp @@ -1452,7 +1452,8 @@ public: theory_var sz = static_cast(th.get_num_vars()); for (theory_var v = 0; v < sz; ++v) { if (th.is_relevant_and_shared(get_enode(v))) { - vars.push_back(m_theory_var2var_index[v]); + lp:: var_index vi = m_theory_var2var_index[v]; + if (vi != UINT_MAX) vars.push_back(vi); } } if (vars.empty()) {