Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dfa7df9

Browse files
committed
Clear the Python exception when the transformation passed in does not parse as an affine transform.
1 parent 6397fe9 commit dfa7df9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/agg_py_transforms.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ py_to_agg_transformation_matrix(PyObject* obj, bool errors = true)
3131
try
3232
{
3333
matrix = (PyArrayObject*) PyArray_FromObject(obj, PyArray_DOUBLE, 2, 2);
34-
if (!matrix)
34+
if (!matrix) {
35+
PyErr_Clear();
3536
throw std::exception();
37+
}
3638
}
3739
catch (...)
3840
{

0 commit comments

Comments
 (0)