Avoid recursive Start menu initialization (#1675)

It may happen that during `InitStartMenuDLL` execution some component
posts a message that is then intercepted by (still active) `HookInject`
that will call `InitStartMenuDLL` again (and everything will repeat).

To prevent such endless recursion during initialization, we will make
sure that `InitStartMenuDLL` will be executed just once.
This commit is contained in:
ge0rdi
2023-08-24 09:05:29 +02:00
parent 422b0481bc
commit aac293832c

View File

@@ -2891,6 +2891,12 @@ static void OpenCortana( void )
static void InitStartMenuDLL( void )
{
static bool initCalled = false;
if (initCalled)
return;
initCalled = true;
LogToFile(STARTUP_LOG, L"StartMenu DLL: InitStartMenuDLL");
WaitDllInitThread();