diff --git a/src/smt/theory_user_propagator.cpp b/src/smt/theory_user_propagator.cpp index 06422cbf0..03ee6b687 100644 --- a/src/smt/theory_user_propagator.cpp +++ b/src/smt/theory_user_propagator.cpp @@ -218,8 +218,9 @@ bool theory_user_propagator::internalize_term(app* term) { unsigned v = add_expr(term); - if (m_created_eh) - m_created_eh(m_user_context, this, term, v); + if (!m_created_eh) + throw default_exception("You have to register a created event handler for new terms"); + m_created_eh(m_user_context, this, term, v); return true; }