From b4bb98b2307f419679275740bfc0a15932e9f4bd Mon Sep 17 00:00:00 2001 From: qianlifeng Date: Mon, 21 Jul 2014 22:35:40 +0800 Subject: [PATCH] Fix websearch setting issues. --- .../WebSearch/WebSearchesSetting.xaml.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Wox.Plugin.SystemPlugins/WebSearch/WebSearchesSetting.xaml.cs b/Wox.Plugin.SystemPlugins/WebSearch/WebSearchesSetting.xaml.cs index 5648f20264..0a5282383e 100644 --- a/Wox.Plugin.SystemPlugins/WebSearch/WebSearchesSetting.xaml.cs +++ b/Wox.Plugin.SystemPlugins/WebSearch/WebSearchesSetting.xaml.cs @@ -101,8 +101,12 @@ namespace Wox.Plugin.SystemPlugins private void ComboBoxSuggestionSource_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { - UserSettingStorage.Instance.WebSearchSuggestionSource = ((ComboBoxItem)e.AddedItems[0]).Content.ToString(); - UserSettingStorage.Instance.Save(); + if (e.AddedItems.Count > 0) + { + UserSettingStorage.Instance.WebSearchSuggestionSource = + ((ComboBoxItem) e.AddedItems[0]).Content.ToString(); + UserSettingStorage.Instance.Save(); + } } } }