gh-118519: Fix empty weakref list check (#118520)

Fix empty list check
This commit is contained in:
Dino Viehland 2024-05-02 13:03:29 -07:00 committed by GitHub
parent 1e67b9207c
commit e54b0c8a4a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -988,7 +988,7 @@ PyObject_ClearWeakRefs(PyObject *object)
}
list = GET_WEAKREFS_LISTPTR(object);
if (FT_ATOMIC_LOAD_PTR(list) == NULL) {
if (FT_ATOMIC_LOAD_PTR(*list) == NULL) {
// Fast path for the common case
return;
}