Skip to content

Commit c474b30

Browse files
committed
Fix possible null reference
1 parent b95bbb3 commit c474b30

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Flow.Launcher/Storage/UserSelectedRecord.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ private static int GenerateResultHashCode(Result result)
5151

5252
private static int GenerateQueryAndResultHashCode(Query query, Result result)
5353
{
54+
if (query == null)
55+
{
56+
return GenerateResultHashCode(result);
57+
}
58+
5459
int hashcode = GenerateStaticHashCode(query.ActionKeyword);
5560
hashcode = GenerateStaticHashCode(query.Search, hashcode);
5661
hashcode = GenerateStaticHashCode(result.Title, hashcode);
@@ -101,4 +106,4 @@ public int GetSelectedCount(Result result)
101106
return selectedCount;
102107
}
103108
}
104-
}
109+
}

0 commit comments

Comments
 (0)