We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7763350 commit a44b306Copy full SHA for a44b306
src/display.c
@@ -365,7 +365,7 @@ PyImaging_GrabScreenWin32(PyObject *self, PyObject *args) {
365
)GetProcAddress(user32, "GetWindowDpiAwarenessContext");
366
DPI_AWARENESS_CONTEXT dpiAwarenessContext =
367
GetWindowDpiAwarenessContext_function(wnd);
368
- if (dpiAwarenessContext != NULL) {
+ if (GetWindowDpiAwarenessContext_function != NULL && dpiAwarenessContext != NULL) {
369
dpiAwareness =
370
SetThreadDpiAwarenessContext_function(dpiAwarenessContext);
371
} else {
0 commit comments