Skip to content

Handle GetForegroundWindow() returning NULL. - #28269

Merged
QuLogic merged 1 commit into
matplotlib:mainfrom
anntzer:gfw
May 21, 2024
Merged

QuLogic merged 1 commit into
matplotlib:mainfrom
anntzer:gfw

Conversation

@anntzer

@anntzer anntzer commented May 21, 2024 •

Copy link
Copy Markdown
Contributor

GetForegroundWindow() is documented as sometimes returning NULL (https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getforegroundwindow), which is not a valid argument to PyCapsule_New. Use None to cover that case, instead.

Closes #28267 (in all likelihood...).

PR summary

PR checklist

GetForegroundWindow() is documented as sometimes returning NULL, which
is not a valid argument to PyCapsule_New.  Use None to cover that case,
instead.
@tacaswell tacaswell added this to the v3.9.1 milestone May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

3 participants