# Bug report ### Bug description: https://github.com/python/cpython/blob/main/Python/pystate.c#L3016 To prevent dangling pointer issues, adding a check for NULL ensures that invalid pointers are not dereferenced <!-- gh-linked-prs --> ### Linked PRs * gh-122929 <!-- /gh-linked-prs -->