mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-04-11 17:37:22 +10:00
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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user