Skip to content

Commit

Permalink
fix #2643
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Oct 18, 2019
1 parent 5eead52 commit 724a42b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cmd_context/basic_cmds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ ATOMIC_CMD(get_proof_cmd, "get-proof", "retrieve proof", {
if (ctx.ignore_check())
return;
expr_ref pr(ctx.m());
pr = ctx.get_check_sat_result()->get_proof();
auto* chsr = ctx.get_check_sat_result();
if (!chsr)
throw cmd_exception("proof is not available");
pr = chsr->get_proof();
if (!pr && !ctx.produce_proofs())
throw cmd_exception("proof construction is not enabled, use command (set-option :produce-proofs true)");
if (!pr)
Expand Down

0 comments on commit 724a42b

Please sign in to comment.