summaryrefslogtreecommitdiffstats
path: root/sandbox/src/sync_interception.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/src/sync_interception.cc')
-rw-r--r--sandbox/src/sync_interception.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/sandbox/src/sync_interception.cc b/sandbox/src/sync_interception.cc
index 715b2a8..aa7112a 100644
--- a/sandbox/src/sync_interception.cc
+++ b/sandbox/src/sync_interception.cc
@@ -52,9 +52,7 @@ HANDLE WINAPI TargetCreateEventW(CreateEventWFunction orig_CreateEvent,
if (SBOX_ALL_OK != code)
break;
- if (NULL == answer.handle)
- break;
-
+ ::SetLastError(answer.win32_result);
return answer.handle;
} while (false);
@@ -98,9 +96,7 @@ HANDLE WINAPI TargetOpenEventW(OpenEventWFunction orig_OpenEvent,
if (SBOX_ALL_OK != code)
break;
- if (NULL == answer.handle)
- break;
-
+ ::SetLastError(answer.win32_result);
return answer.handle;
} while (false);