From b3c64660535039dd324f9902c2828b0a52d4a2c5 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Mon, 5 Jul 2021 11:48:30 +0800 Subject: [PATCH] Check null and return input value in UserSelectedRecord.cs to avoid error thrown. --- Flow.Launcher/Storage/UserSelectedRecord.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/Storage/UserSelectedRecord.cs b/Flow.Launcher/Storage/UserSelectedRecord.cs index 8d8956cfa..23d8c4faf 100644 --- a/Flow.Launcher/Storage/UserSelectedRecord.cs +++ b/Flow.Launcher/Storage/UserSelectedRecord.cs @@ -28,6 +28,11 @@ namespace Flow.Launcher.Storage private static int GenerateStaticHashCode(string s, int start = HASH_INITIAL) { + if (s == null) + { + return start; + } + unchecked { // skip the empty space @@ -101,4 +106,4 @@ namespace Flow.Launcher.Storage return selectedCount; } } -} +} \ No newline at end of file