Skip to content

Commit 73dd9d2

Browse files
committed
Fix crash in power()
1 parent d257b42 commit 73dd9d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2591,7 +2591,7 @@ power(PyObject *self, PyObject *other, PyObject *module)
25912591
else {
25922592
res = MPZ_powm(u, v, w);
25932593
}
2594-
if (negativeOutput && res->size) {
2594+
if (negativeOutput && res && res->size) {
25952595
MPZ_Object *tmp = res;
25962596

25972597
res = MPZ_sub(res, w);

0 commit comments

Comments
 (0)