Skip to content

Commit

Permalink
Fixed deadlock when parent window is null
Browse files Browse the repository at this point in the history
  • Loading branch information
hdlx committed Jan 3, 2025
1 parent 17b25a4 commit 4ccb57a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Sources/AltAppSwitcher/App.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,20 +916,14 @@ static void InitializeSwitchApp(SAppData* appData)
static void InitializeSwitchWin(SAppData* appData)
{
HWND win = GetForegroundWindow();
if (!win)
{
return;
}
while (true)
{
if (IsAltTabWindow(win))
if (!win || IsAltTabWindow(win))
break;
win = GetParent(win);
}
if (!win)
{
return;
}
DWORD PID;
BOOL isUWP = false;
FindActualPID(win, &PID, &isUWP);
Expand Down

0 comments on commit 4ccb57a

Please sign in to comment.