Also error-check wxArrayInt conversion

This commit is contained in:
Robin Dunn
2017-06-27 20:15:33 -07:00
parent 9a8a5ee545
commit b8260ea7f1

View File

@@ -61,8 +61,10 @@ wxVariant wxPGVariant_in_helper(PyObject* obj)
else if (sipCanConvertToType(obj, sipType_wxArrayInt, 0)) {
wxArrayInt* ptr;
ptr = (wxArrayInt*)sipConvertToType(obj, sipType_wxArrayInt, NULL, 0, &state, &isErr);
value << *ptr;
sipReleaseType(ptr, sipType_wxArrayInt, state);
if (!isErr) {
value << *ptr;
sipReleaseType(ptr, sipType_wxArrayInt, state);
}
}
else