fix null error when plugin doesn't set Action (#656)

This commit is contained in:
xiami 2016-05-21 00:14:24 +08:00 committed by bao-qian
parent 452e8ed8c5
commit 635a8a24f2

View File

@ -184,7 +184,7 @@ namespace Wox.ViewModel
var result = results.SelectedItem?.RawResult;
if (result != null) // SelectedItem returns null if selection is empty.
{
bool hideWindow = result.Action(new ActionContext
bool hideWindow = result.Action != null && result.Action(new ActionContext
{
SpecialKeyState = GlobalHotkey.Instance.CheckModifiers()
});