Skip to content

Commit a166b47

Browse files
committed
fix
1 parent 94312c3 commit a166b47

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Python/optimizer.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,11 @@ add_to_pending_deletion_list(_PyExecutorObject *self)
314314
static void
315315
uop_dealloc(PyObject *op) {
316316
_PyExecutorObject *self = _PyExecutorObject_CAST(op);
317-
_PyObject_GC_UNTRACK(self);
317+
318+
if (_PyObject_GC_IS_TRACKED(self)) {
319+
_PyObject_GC_UNTRACK(self);
320+
}
321+
318322
assert(self->vm_data.code == NULL);
319323
unlink_executor(self);
320324
// Once unlinked it becomes impossible to invalidate an executor, so do it here.

0 commit comments

Comments
 (0)