aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Sorting/IsFolderComparer.cs
diff options
context:
space:
mode:
authordkanada <dkanada@users.noreply.github.com>2021-09-06 13:42:48 +0900
committerdkanada <dkanada@users.noreply.github.com>2021-09-06 13:42:48 +0900
commitf6c0db4bb5007182d79ceb809675b90909fd1fa0 (patch)
treeab13e60d0cba2477585a6d0ec601f10ad9f112b2 /Emby.Server.Implementations/Sorting/IsFolderComparer.cs
parent776ce7c660a6d6bf975766378d6db7124f4ac232 (diff)
parente9508616cc90c01a22ca28c13694587dd16b49d6 (diff)
merge branch 'master' into syncplay-sessions-fix
Diffstat (limited to 'Emby.Server.Implementations/Sorting/IsFolderComparer.cs')
-rw-r--r--Emby.Server.Implementations/Sorting/IsFolderComparer.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Sorting/IsFolderComparer.cs b/Emby.Server.Implementations/Sorting/IsFolderComparer.cs
index a35192eff..3c5ddeefa 100644
--- a/Emby.Server.Implementations/Sorting/IsFolderComparer.cs
+++ b/Emby.Server.Implementations/Sorting/IsFolderComparer.cs
@@ -20,7 +20,7 @@ namespace Emby.Server.Implementations.Sorting
/// <param name="x">The x.</param>
/// <param name="y">The y.</param>
/// <returns>System.Int32.</returns>
- public int Compare(BaseItem x, BaseItem y)
+ public int Compare(BaseItem? x, BaseItem? y)
{
return GetValue(x).CompareTo(GetValue(y));
}
@@ -30,9 +30,9 @@ namespace Emby.Server.Implementations.Sorting
/// </summary>
/// <param name="x">The x.</param>
/// <returns>System.String.</returns>
- private static int GetValue(BaseItem x)
+ private static int GetValue(BaseItem? x)
{
- return x.IsFolder ? 0 : 1;
+ return x?.IsFolder ?? true ? 0 : 1;
}
}
}