| Index: sandbox/win/tests/integration_tests/hooking_dll.cc
|
| diff --git a/sandbox/win/tests/integration_tests/hooking_dll.cc b/sandbox/win/tests/integration_tests/hooking_dll.cc
|
| index f275ae6e940208bc65b71ddeced35199cb7827a7..9fe664d8f775833c6a22778ae7eae4e3c4ab1690 100644
|
| --- a/sandbox/win/tests/integration_tests/hooking_dll.cc
|
| +++ b/sandbox/win/tests/integration_tests/hooking_dll.cc
|
| @@ -5,7 +5,6 @@
|
| #include <stdio.h>
|
| #include <windows.h>
|
|
|
| -#define _DLL_EXPORTING
|
| #include "integration_tests_common.h"
|
|
|
| // This data section creates a common area that is accessible
|
| @@ -54,10 +53,10 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved) {
|
| if (reason == DLL_PROCESS_ATTACH) {
|
| // The testing process should have set up this named event already
|
| // (if the test needs this event to be signaled).
|
| - event = ::OpenEventW(EVENT_MODIFY_STATE, FALSE, g_hook_event);
|
| + event = ::OpenEventW(EVENT_MODIFY_STATE, FALSE, sandbox::g_hook_event);
|
| }
|
|
|
| - if (reason == DLL_PROCESS_DETACH)
|
| + if (reason == DLL_PROCESS_DETACH && event != nullptr)
|
| ::CloseHandle(event);
|
|
|
| return TRUE;
|
|
|