Skip to content

Commit 0a37194

Browse files
fix #7609
1 parent 5e10fd3 commit 0a37194

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/api/api_goal.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,10 @@ extern "C" {
158158
model_ref new_m;
159159
Z3_model_ref * m_ref = alloc(Z3_model_ref, *mk_c(c));
160160
mk_c(c)->save_object(m_ref);
161-
if (m) m_ref->m_model = to_model_ref(m)->copy();
161+
if (m)
162+
m_ref->m_model = to_model_ref(m)->copy();
163+
else
164+
m_ref->m_model = alloc(model, mk_c(c)->m());
162165
if (to_goal_ref(g)->mc())
163166
(*to_goal_ref(g)->mc())(m_ref->m_model);
164167
RETURN_Z3(of_model(m_ref));

0 commit comments

Comments
 (0)