diff --git a/Flow.Launcher.Infrastructure/Win32Helper.cs b/Flow.Launcher.Infrastructure/Win32Helper.cs index b5b89e2d1..f260b17d1 100644 --- a/Flow.Launcher.Infrastructure/Win32Helper.cs +++ b/Flow.Launcher.Infrastructure/Win32Helper.cs @@ -364,6 +364,9 @@ namespace Flow.Launcher.Infrastructure // No installed English layout found if (enHKL == HKL.Null) return; + // When application is exiting, the Application.Current will be null + if (Application.Current == null) return; + // Get the FL main window var hwnd = GetWindowHandle(Application.Current.MainWindow, true); if (hwnd == HWND.Null) return;