From 35f8ea3b38ddf715f0f4e1c1c14f052aeec34295 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Wed, 25 Jun 2025 23:15:45 +0800 Subject: [PATCH] Check hotkey mapper count --- Flow.Launcher/Helper/HotKeyMapper.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/Helper/HotKeyMapper.cs b/Flow.Launcher/Helper/HotKeyMapper.cs index 8a9c07d9a..064ebf3bc 100644 --- a/Flow.Launcher/Helper/HotKeyMapper.cs +++ b/Flow.Launcher/Helper/HotKeyMapper.cs @@ -191,10 +191,11 @@ internal static class HotKeyMapper } } - private static void SetWindowHotkey(KeyGesture keyGesture, List<(PluginMetadata Metadata, SearchWindowPluginHotkey PluginHotkey)> hotkeyModels) + internal static void SetWindowHotkey(KeyGesture keyGesture, List<(PluginMetadata Metadata, SearchWindowPluginHotkey PluginHotkey)> hotkeyModels) { try { + if (hotkeyModels.Count == 0) return; if (Application.Current?.MainWindow is MainWindow window) { var command = BuildCommand(hotkeyModels);