Commit c5f35295 authored by Victor Stinner's avatar Victor Stinner

Issue #19437: Fix GetKeepedObjects() of ctypes, handle PyCData_GetContainer()

failure
parent f1117728
......@@ -2344,7 +2344,11 @@ PyCData_GetContainer(CDataObject *self)
static PyObject *
GetKeepedObjects(CDataObject *target)
{
return PyCData_GetContainer(target)->b_objects;
CDataObject *container;
container = PyCData_GetContainer(target);
if (container == NULL)
return NULL;
return container->b_objects;
}
static PyObject *
......
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