From 0b3bbc297248849cb17c29e0fbaa23f61bb45716 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Mon, 11 Mar 2024 18:19:36 -0700 Subject: [PATCH] #7158 Signed-off-by: Nikolaj Bjorner --- src/api/api_util.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/api/api_util.h b/src/api/api_util.h index 0ff2c8ddd..174d75144 100644 --- a/src/api/api_util.h +++ b/src/api/api_util.h @@ -110,6 +110,7 @@ inline param_descrs * to_param_descrs_ptr(Z3_param_descrs p) { return p == nullp Z3_TRY; \ RESET_ERROR_CODE(); \ EXTRA_CODE; \ + CHECK_IS_EXPR(n, nullptr); \ expr * _n = to_expr(n); \ ast* a = mk_c(c)->m().mk_app(FID, OP, 0, 0, 1, &_n); \ mk_c(c)->save_ast_trail(a); \ @@ -127,6 +128,8 @@ Z3_ast Z3_API NAME(Z3_context c, Z3_ast n) { \ Z3_TRY; \ RESET_ERROR_CODE(); \ EXTRA_CODE; \ + CHECK_IS_EXPR(n1, nullptr); \ + CHECK_IS_EXPR(n2, nullptr); \ expr * args[2] = { to_expr(n1), to_expr(n2) }; \ ast* a = mk_c(c)->m().mk_app(FID, OP, 0, 0, 2, args); \ mk_c(c)->save_ast_trail(a); \