From 715d1dc82b2860d5bb9e13631c61f1cbd814e0ec Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Mon, 19 Nov 2018 22:40:31 +0200 Subject: [PATCH] Fix passing NULL pointers as arguments via ptrcall --- binding_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binding_generator.py b/binding_generator.py index c26c9eb4..16db7eb9 100644 --- a/binding_generator.py +++ b/binding_generator.py @@ -625,7 +625,7 @@ def generate_icall_implementation(icalls): if is_primitive(arg) or is_core_type(arg): wrapped_argument += "(void *) &arg" + str(i) else: - wrapped_argument += "(void *) arg" + str(i) + "->_owner" + wrapped_argument += "(void *) (arg" + str(i) + ") ? arg" + str(i) + "->_owner : nullptr" wrapped_argument += "," source.append(wrapped_argument)