mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-10 07:51:03 +02:00
misc: chore: Fix possible NullReferenceExceptions, suppress warnings
This commit is contained in:
@@ -173,7 +173,7 @@ namespace Ryujinx.HLE.HOS
|
||||
types.Clear();
|
||||
Mod<DirectoryInfo> mod = new("", null, true);
|
||||
|
||||
if (StrEquals(RomfsDir, modDir.Name))
|
||||
if (StrEquals(RomfsDir, modDir.Name) && modDir.Parent != null)
|
||||
{
|
||||
var modData = modMetadata.Mods.FirstOrDefault(x => modDir.Parent.FullName.Equals(x.Path));
|
||||
var enabled = modData?.Enabled ?? true;
|
||||
@@ -181,7 +181,7 @@ namespace Ryujinx.HLE.HOS
|
||||
mods.RomfsDirs.Add(mod = new Mod<DirectoryInfo>(dir.Name, modDir, enabled));
|
||||
types.Append('R');
|
||||
}
|
||||
else if (StrEquals(ExefsDir, modDir.Name))
|
||||
else if (StrEquals(ExefsDir, modDir.Name) && modDir.Parent != null)
|
||||
{
|
||||
var modData = modMetadata.Mods.FirstOrDefault(x => modDir.Parent.FullName.Equals(x.Path));
|
||||
var enabled = modData?.Enabled ?? true;
|
||||
|
||||
Reference in New Issue
Block a user