Skip to content

Commit 265a039

Browse files
committed
FastDSS: fix subtle issue on ODD.py
1 parent 2262a36 commit 265a039

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/_fastdss.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,6 @@ static PyObject *AltDSS_PyStrListGetter_call(AltDSS_PyStrListGetterObject *f, Py
836836
return NULL;
837837
}
838838

839-
result = PyList_New(count[0]);
840839
if (PyErr_Occurred())
841840
{
842841
f->dssCFuncs->DSS_Dispose_PPAnsiChar(&cstr_list, count[1]);
@@ -861,6 +860,8 @@ static PyObject *AltDSS_PyStrListGetter_call(AltDSS_PyStrListGetterObject *f, Py
861860
}
862861
}
863862

863+
result = PyList_New(count[0]);
864+
864865
for (i = 0, sptr = cstr_list; i < count[0]; ++i, ++sptr)
865866
{
866867
item = (*sptr) ? PyUnicode_FromString(*sptr) : PyUnicode_FromString("");

0 commit comments

Comments
 (0)