From 0720779c6b0632eb7f8ac26e78b1f28b5f1e5569 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Wed, 27 Nov 2024 20:19:31 +0800 Subject: [PATCH] Fix possible null reference when query is cancelled --- Flow.Launcher/Storage/TopMostRecord.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/Storage/TopMostRecord.cs b/Flow.Launcher/Storage/TopMostRecord.cs index 50ce96ded..a088353f5 100644 --- a/Flow.Launcher/Storage/TopMostRecord.cs +++ b/Flow.Launcher/Storage/TopMostRecord.cs @@ -18,7 +18,7 @@ namespace Flow.Launcher.Storage } // since this dictionary should be very small (or empty) going over it should be pretty fast. - return records[result.OriginQuery.RawQuery].Equals(result); + return result.OriginQuery != null && records[result.OriginQuery.RawQuery].Equals(result); } internal void Remove(Result result)