3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-06 15:25:46 +00:00

harness internalization and API for #1776

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-08-02 20:18:27 -07:00
parent fed977b492
commit f306f75e36
5 changed files with 16 additions and 12 deletions

View file

@ -379,11 +379,13 @@ extern "C" {
Z3_TRY;
LOG_Z3_dec_ref(c, a);
RESET_ERROR_CODE();
if (to_ast(a)->get_ref_count() == 0) {
if (a && to_ast(a)->get_ref_count() == 0) {
SET_ERROR_CODE(Z3_DEC_REF_ERROR, nullptr);
return;
}
mk_c(c)->m().dec_ref(to_ast(a));
if (a) {
mk_c(c)->m().dec_ref(to_ast(a));
}
Z3_CATCH;
}