win32ss/user/ntuser/class.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/win32ss/user/ntuser/class.c b/win32ss/user/ntuser/class.c index 9210852dca7..8bac733b2a5 100644 --- a/win32ss/user/ntuser/class.c +++ b/win32ss/user/ntuser/class.c @@ -1352,9 +1352,17 @@ IntGetAtomFromStringOrAtom( } else { - ASSERT(IS_ATOM(ClassName->Buffer)); - *Atom = (RTL_ATOM)((ULONG_PTR)ClassName->Buffer); - Ret = TRUE; + if (ClassName->Buffer) + { + *Atom = (RTL_ATOM)((ULONG_PTR)ClassName->Buffer); + Ret = TRUE; + } + else + { + *Atom = 0; + EngSetLastError(ERROR_CLASS_DOES_NOT_EXIST); + Ret = FALSE; + } } return Ret;