Skip to content

Commit 6c45882

Browse files
committed
Fix possible NullReferenceException
1 parent ecd019d commit 6c45882

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Flow.Launcher.Plugin/SharedModels/ThemeData.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,16 @@ public ThemeData(string fileNameWithoutExtension, string name, bool? isDark = nu
4141
/// <inheritdoc />
4242
public static bool operator ==(ThemeData left, ThemeData right)
4343
{
44+
if (left is null && right is null)
45+
return true;
4446
return left.Equals(right);
4547
}
4648

4749
/// <inheritdoc />
4850
public static bool operator !=(ThemeData left, ThemeData right)
4951
{
52+
if (left is null && right is null)
53+
return false;
5054
return !(left == right);
5155
}
5256

0 commit comments

Comments
 (0)