Author: greatlrd Date: Sun May 21 10:17:25 2006 New Revision: 21957
URL: http://svn.reactos.ru/svn/reactos?rev=21957&view=rev Log: patch from w3seek : Another fix for NtUserFindWindowEx
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntus... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/window.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/window.c Sun May 21 10:17:25 2006 @@ -2444,13 +2444,16 @@ ClassName.Length, sizeof(WCHAR)); } - else if (IS_ATOM(ClassName.Buffer)) + else if (ClassName.Buffer != NULL && !IS_ATOM(ClassName.Buffer)) { - if (!IntGetAtomFromStringOrAtom(&ClassName, - &ClassAtom)) - { - _SEH_LEAVE; - } + SetLastWin32Error(ERROR_INVALID_PARAMETER); + _SEH_LEAVE; + } + + if (!IntGetAtomFromStringOrAtom(&ClassName, + &ClassAtom)) + { + _SEH_LEAVE; } }
@@ -2472,9 +2475,10 @@ } _SEH_END;
- if (ucClassName != NULL && ClassName.Length == 0) - { - if (!IS_ATOM(ClassName.Buffer)) + if (ucClassName != NULL) + { + if (ClassName.Length == 0 && ClassName.Buffer != NULL && + !IS_ATOM(ClassName.Buffer)) { SetLastWin32Error(ERROR_INVALID_PARAMETER); RETURN(NULL);