Merge pull request #7548 from 1337joe/comparer-null-fix

(cherry picked from commit 72aca15191)
Signed-off-by: crobibero <cody@robibe.ro>
This commit is contained in:
Cody Robibero
2022-04-04 06:30:24 -06:00
committed by crobibero
parent 1425ef3cb4
commit 04cac23a11
4 changed files with 109 additions and 0 deletions

View File

@@ -34,6 +34,11 @@ namespace Emby.Server.Implementations.Sorting
throw new ArgumentNullException(nameof(y));
}
if (!x.ParentIndexNumber.HasValue && !y.ParentIndexNumber.HasValue)
{
return 0;
}
if (!x.ParentIndexNumber.HasValue)
{
return -1;