From 729748b0298c6dbcf58ba3ea582e8fc5d4515a79 Mon Sep 17 00:00:00 2001 From: "Alexander A. Shvedov" <60114847+a-shvedov@users.noreply.github.com> Date: Mon, 13 Feb 2023 00:28:08 +0300 Subject: [PATCH] Update object.h fixed SIG11 called synt example (<#0 Py_INCREF (op=0x0) at ./Include/object.h:502>) --- Include/object.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Include/object.h b/Include/object.h index 3774f1267300054..7344ecb70d3ec65 100644 --- a/Include/object.h +++ b/Include/object.h @@ -511,6 +511,9 @@ PyAPI_FUNC(void) _Py_DecRef(PyObject *); static inline void Py_INCREF(PyObject *op) { + if (op == NULL) { + return; + } #if defined(Py_REF_DEBUG) && defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030A0000 // Stable ABI for Python 3.10 built in debug mode. _Py_IncRef(op);