diff --git a/dlls/powrprof/powrprof.c b/dlls/powrprof/powrprof.c index a5897280fc9..7327fdfe41f 100644 --- a/dlls/powrprof/powrprof.c +++ b/dlls/powrprof/powrprof.c @@ -341,6 +341,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) break; } case DLL_PROCESS_DETACH: + if (lpvReserved) break; CloseHandle(PPRegSemaphore); break; }