From d14f00d61abd697c5ae03dd1e8079f272d72ad45 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Thu, 6 Jan 2022 13:02:13 -0800 Subject: [PATCH] with no last model Signed-off-by: Nikolaj Bjorner --- src/opt/opt_solver.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/opt/opt_solver.cpp b/src/opt/opt_solver.cpp index f184a818c..01975464a 100644 --- a/src/opt/opt_solver.cpp +++ b/src/opt/opt_solver.cpp @@ -260,7 +260,10 @@ namespace opt { m_models.set(i, m_last_model.get()); if (val > m_objective_values[i]) - m_objective_values[i] = val; + m_objective_values[i] = val; + + if (!m_last_model) + return true; // // retrieve value of objective from current model and update