Skip to content

Commit 9474990

Browse files
committed
fix the reference count
WIP: I don't know exactly why...
1 parent c63b609 commit 9474990

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/PyListProxyHandler.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,9 @@ static bool array_fill(JSContext *cx, unsigned argc, JS::Value *vp) {
436436
}
437437
}
438438

439-
if (!setItemCalled) {
440-
Py_DECREF(fillValueItem);
439+
Py_INCREF(fillValueItem);
440+
if (setItemCalled) {
441+
Py_INCREF(fillValueItem);
441442
}
442443

443444
// return ref to self

0 commit comments

Comments
 (0)