Fix DumpObject to work with lists

This commit is contained in:
baldurk
2020-12-15 22:52:38 +00:00
parent f32008e95f
commit 4bc795c344
2 changed files with 70 additions and 33 deletions
+12 -1
View File
@@ -649,7 +649,18 @@ struct TypeConversion<rdcfixedarray<U, N>, false>
for(size_t i = 0; i < N; i++)
{
int ret = TypeConversion<U>::ConvertFromPy(PySequence_GetItem(in, i), out[i]);
PyObject *elem = PySequence_GetItem(in, i);
if(!elem)
{
if(failIdx)
*failIdx = (int)i;
return SWIG_TypeError;
}
int ret = TypeConversion<U>::ConvertFromPy(elem, out[i]);
Py_XDECREF(elem);
if(!SWIG_IsOK(ret))
{