3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 18:31:49 +00:00

more missing nullptr flexibility #5156

This commit is contained in:
Nikolaj Bjorner 2021-04-08 10:34:09 -07:00
parent b1f5933c7d
commit d91eac24b7
8 changed files with 20 additions and 10 deletions

View file

@ -53,7 +53,8 @@ extern "C" {
Z3_TRY;
LOG_Z3_ast_map_dec_ref(c, m);
RESET_ERROR_CODE();
to_ast_map(m)->dec_ref();
if (m)
to_ast_map(m)->dec_ref();
Z3_CATCH;
}

View file

@ -243,7 +243,8 @@ extern "C" {
Z3_TRY;
LOG_Z3_fixedpoint_dec_ref(c, s);
RESET_ERROR_CODE();
to_fixedpoint(s)->dec_ref();
if (s)
to_fixedpoint(s)->dec_ref();
Z3_CATCH;
}

View file

@ -53,7 +53,8 @@ extern "C" {
Z3_TRY;
LOG_Z3_goal_dec_ref(c, g);
RESET_ERROR_CODE();
to_goal(g)->dec_ref();
if (g)
to_goal(g)->dec_ref();
Z3_CATCH;
}

View file

@ -68,7 +68,8 @@ extern "C" {
Z3_TRY;
LOG_Z3_optimize_dec_ref(c, o);
RESET_ERROR_CODE();
to_optimize(o)->dec_ref();
if (o)
to_optimize(o)->dec_ref();
Z3_CATCH;
}

View file

@ -55,7 +55,8 @@ extern "C" {
Z3_TRY;
LOG_Z3_params_dec_ref(c, p);
RESET_ERROR_CODE();
to_params(p)->dec_ref();
if (p)
to_params(p)->dec_ref();
Z3_CATCH;
}

View file

@ -402,7 +402,8 @@ extern "C" {
Z3_TRY;
LOG_Z3_solver_dec_ref(c, s);
RESET_ERROR_CODE();
to_solver(s)->dec_ref();
if (s)
to_solver(s)->dec_ref();
Z3_CATCH;
}

View file

@ -49,7 +49,8 @@ extern "C" {
Z3_TRY;
LOG_Z3_stats_dec_ref(c, s);
RESET_ERROR_CODE();
to_stats(s)->dec_ref();
if (s)
to_stats(s)->dec_ref();
Z3_CATCH;
}

View file

@ -74,7 +74,8 @@ extern "C" {
Z3_TRY;
LOG_Z3_tactic_dec_ref(c, t);
RESET_ERROR_CODE();
to_tactic(t)->dec_ref();
if (t)
to_tactic(t)->dec_ref();
Z3_CATCH;
}
@ -104,7 +105,8 @@ extern "C" {
Z3_TRY;
LOG_Z3_probe_dec_ref(c, p);
RESET_ERROR_CODE();
to_probe(p)->dec_ref();
if (p)
to_probe(p)->dec_ref();
Z3_CATCH;
}
@ -476,7 +478,8 @@ extern "C" {
Z3_TRY;
LOG_Z3_apply_result_dec_ref(c, r);
RESET_ERROR_CODE();
to_apply_result(r)->dec_ref();
if (r)
to_apply_result(r)->dec_ref();
Z3_CATCH;
}