diff --git a/reactos/dll/win32/user32/windows/window.c b/reactos/dll/win32/user32/windows/window.c index 9ad0f2198c3..b91392f3635 100644 --- a/reactos/dll/win32/user32/windows/window.c +++ b/reactos/dll/win32/user32/windows/window.c @@ -653,6 +653,14 @@ User32EnumWindows(HDESK hDesktop, return FALSE; } + if (!dwCount) + { + if (!dwThreadId) + return FALSE; + else + return TRUE; + } + /* call the user's callback function until we're done or they tell us to quit */ for ( i = 0; i < dwCount; i++ )