Skip to content

Commit

Permalink
Do not try to destroy the refchain if it is NULL.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsnowcurrently committed Oct 22, 2024
1 parent d80fe6a commit 1360d86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Objects/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ refchain_init(PyInterpreterState *interp)
static void
refchain_fini(PyInterpreterState *interp)
{
if (has_own_refchain(interp)) {
if (has_own_refchain(interp) && REFCHAIN(interp) != NULL) {
_Py_hashtable_destroy(REFCHAIN(interp));
}
REFCHAIN(interp) = NULL;
Expand Down

0 comments on commit 1360d86

Please sign in to comment.