Skip to content

Commit aac2938

Browse files
committed
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.
1 parent 422b048 commit aac2938

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2891,6 +2891,12 @@ static void OpenCortana( void )
28912891

28922892
static void InitStartMenuDLL( void )
28932893
{
2894+
static bool initCalled = false;
2895+
if (initCalled)
2896+
return;
2897+
2898+
initCalled = true;
2899+
28942900
LogToFile(STARTUP_LOG, L"StartMenu DLL: InitStartMenuDLL");
28952901
WaitDllInitThread();
28962902

0 commit comments

Comments
 (0)