From cb1da686ec25a03086139a33a6947fb1150ef4e6 Mon Sep 17 00:00:00 2001 From: bao-qian Date: Wed, 4 Nov 2015 00:26:15 +0000 Subject: [PATCH] Fix System.NullReferenceException for #356 --- Wox/MainWindow.xaml.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Wox/MainWindow.xaml.cs b/Wox/MainWindow.xaml.cs index 04f29a60b..ee3044e4b 100644 --- a/Wox/MainWindow.xaml.cs +++ b/Wox/MainWindow.xaml.cs @@ -480,8 +480,11 @@ namespace Wox private void Query(string text) { var query = PluginManager.QueryInit(text); - lastQuery = query?.RawQuery; - PluginManager.QueryForAllPlugins(query); + if (query != null) + { + lastQuery = query.RawQuery; + PluginManager.QueryForAllPlugins(query); + } StopProgress(); }