Skip to content

Commit d8198d0

Browse files
committed
Add a null/invalid ContextData guard in hotkey Action
1 parent 007c089 commit d8198d0

File tree

1 file changed

+2
-2
lines changed
  • Plugins/Flow.Launcher.Plugin.Program

1 file changed

+2
-2
lines changed

Plugins/Flow.Launcher.Plugin.Program/Main.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,12 +481,12 @@ public List<BasePluginHotkey> GetPluginHotkeys()
481481
Visible = true,
482482
Action = (r) =>
483483
{
484-
if (r.ContextData is UWPApp uwp)
484+
if (r?.ContextData is UWPApp uwp)
485485
{
486486
Context.API.OpenDirectory(uwp.Location);
487487
return true;
488488
}
489-
else if (r.ContextData is Win32 win32)
489+
else if (r?.ContextData is Win32 win32)
490490
{
491491
Context.API.OpenDirectory(win32.ParentDirectory, win32.FullPath);
492492
return true;

0 commit comments

Comments
 (0)