diff --git a/reactos/subsystems/win32/win32k/ntuser/vis.c b/reactos/subsystems/win32/win32k/ntuser/vis.c index d89a1348097..50a1e2cf9ae 100644 --- a/reactos/subsystems/win32/win32k/ntuser/vis.c +++ b/reactos/subsystems/win32/win32k/ntuser/vis.c @@ -69,7 +69,7 @@ VIS_ComputeVisibleRegion( while (CurrentWindow) { CurrentWnd = CurrentWindow->Wnd; - if (!(CurrentWnd->Style & WS_VISIBLE)) + if (!(CurrentWnd) || !(CurrentWnd->Style & WS_VISIBLE)) { NtGdiDeleteObject(VisRgn); return NULL;