From c1003dbbc24a76415478209e46988ac0123ef915 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Thu, 26 Jul 2018 15:00:02 -0600
Subject: [PATCH 68/83] ntdll: Ignore pseudo-handles.

---
 dlls/ntdll/esync.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dlls/ntdll/esync.c b/dlls/ntdll/esync.c
index 3d0c17fd1..506d1c99d 100644
--- a/dlls/ntdll/esync.c
+++ b/dlls/ntdll/esync.c
@@ -228,6 +228,12 @@ static NTSTATUS get_object( HANDLE handle, struct esync **obj )
 
     if ((*obj = get_cached_object( handle ))) return STATUS_SUCCESS;
 
+    if ((INT_PTR)handle < 0)
+    {
+        /* We can deal with pseudo-handles, but it's just easier this way */
+        return STATUS_NOT_IMPLEMENTED;
+    }
+
     /* We need to try grabbing it from the server. */
     server_enter_uninterrupted_section( &fd_cache_section, &sigset );
     if (!(*obj = get_cached_object( handle )))
-- 
2.20.1

