mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-30 00:18:13 +02:00
misc: chore: Fix possible System.NullReferenceExceptions
This commit is contained in:
@@ -8,6 +8,7 @@ using Ryujinx.Ava.UI.Helpers;
|
||||
using Ryujinx.Common.Utilities;
|
||||
using Ryujinx.UI.App.Common;
|
||||
using Ryujinx.UI.Common.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
@@ -264,7 +265,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
switch (_viewModel.SortingField)
|
||||
{
|
||||
case SortField.Name:
|
||||
result = x.Name.CompareTo(y.Name);
|
||||
result = String.Compare(x?.Name, y?.Name, StringComparison.Ordinal);
|
||||
break;
|
||||
case SortField.Saved:
|
||||
result = x.PotentialSavingsB.CompareTo(y.PotentialSavingsB);
|
||||
@@ -275,7 +276,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
result = -result;
|
||||
|
||||
if (result == 0)
|
||||
result = x.Path.CompareTo(y.Path);
|
||||
result = String.Compare(x?.Path, y?.Path, StringComparison.Ordinal);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user