diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index b3a688c7f55..29d62bf9e4d 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -196,11 +196,9 @@ visit_decref(PyObject *op, void *data) * getting collected. That would be a waste of time, but wouldn't * cause an error. */ - if (op && PyObject_IS_GC(op)) { - if (IS_TRACKED(op)) { - AS_GC(op)->gc.gc_refs--; - } - } + assert(op != NULL); + if (PyObject_IS_GC(op)) + AS_GC(op)->gc.gc_refs--; return 0; }