- Fix two potential crashes
authorDmitry Chapyshev <dmitry@reactos.org>
Sat, 23 May 2009 17:20:30 +0000 (17:20 +0000)
committerDmitry Chapyshev <dmitry@reactos.org>
Sat, 23 May 2009 17:20:30 +0000 (17:20 +0000)
svn path=/trunk/; revision=41080

reactos/subsystems/win32/win32k/ntuser/event.c
reactos/subsystems/win32/win32k/ntuser/message.c

index 71bdd55..c35ca24 100644 (file)
@@ -227,6 +227,7 @@ NtUserNotifyWinEvent(
    /* Validate input */
    if (hWnd && (hWnd != INVALID_HANDLE_VALUE) && !(Window = UserGetWindowObject(hWnd)))
    {
+      UserLeave();
       return;
    }   
    
index 8d0d484..147a250 100644 (file)
@@ -2042,6 +2042,7 @@ NtUserMessageCall(
    /* Validate input */
    if (hWnd && (hWnd != INVALID_HANDLE_VALUE) && !(Window = UserGetWindowObject(hWnd)))
    {
+      UserLeave();
       return 0;
    }
    switch(dwType)