Fix incorrect error handling logic in keyboard layout change

This commit is contained in:
Yusyuriv 2025-03-23 18:53:01 +06:00
parent 4df42a0f63
commit 1bf573344a
No known key found for this signature in database
GPG key ID: A91C52E6F73148E0

View file

@ -351,7 +351,7 @@ namespace Flow.Launcher.Infrastructure
fixed (HKL* h = handles)
{
var result = PInvoke.GetKeyboardLayoutList(count, h);
if (result != 0)
if (result == 0)
{
throw new Win32Exception(Marshal.GetLastWin32Error());
}