Skip to content

Commit 7df55c2

Browse files
committed
fix invert matrix bug
1 parent abd6780 commit 7df55c2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

fitz/fitz.i

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11089,7 +11089,11 @@ struct Tools
1108911089
a = -src.e * dst.a - src.f * dst.c;
1109011090
dst.f = -src.e * dst.b - src.f * dst.d;
1109111091
dst.e = a;
11092-
return Py_BuildValue("(i, O)", 0, JM_py_from_matrix(dst));
11092+
PyObject* mat = JM_py_from_matrix(dst);
11093+
PyObject* res = Py_BuildValue("(i, O)", 0, mat);
11094+
Py_DECREF(mat);
11095+
return res;
11096+
// return Py_BuildValue("(i, O)", 0, JM_py_from_matrix(dst));
1109311097
}
1109411098
return Py_BuildValue("(i, ())", 1);
1109511099
}

0 commit comments

Comments
 (0)