Commit 5d6f9c0b authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Increment Python object reference count in event handler when the object already exists.

parent 5719dd8e
......@@ -766,6 +766,8 @@ class EventCallbackMethodDefinition(MethodDefinition):
""" {get_user_data_code}
if (py{name} == NULL) {{
}} else {{
""".format(name=arg_name, get_user_data_code=get_user_data_code, new_from_native_pointer_code=new_from_native_pointer_code)
decref_python_objects_code += "\t\tPy_DECREF(py{name});\n".format(name=arg_name)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment