mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-09 08:19:03 +02:00
misc: chore: Fix possible NullReferenceExceptions, InvalidOperationExceptions
This commit is contained in:
@@ -58,7 +58,7 @@ namespace ARMeilleure.Translation
|
||||
|
||||
private static string GetKey(MethodInfo info)
|
||||
{
|
||||
return $"{info.DeclaringType.Name}.{info.Name}";
|
||||
return $"{info.DeclaringType?.Name}.{info.Name}";
|
||||
}
|
||||
|
||||
private static readonly SortedList<string, DelegateInfo> _delegates;
|
||||
|
||||
@@ -316,13 +316,16 @@ namespace ARMeilleure.Translation
|
||||
{
|
||||
_root = newNode;
|
||||
}
|
||||
else if (start.CompareTo(parent.Start) < 0)
|
||||
else if (parent != null && start.CompareTo(parent.Start) < 0)
|
||||
{
|
||||
parent.Left = newNode;
|
||||
}
|
||||
else
|
||||
{
|
||||
parent.Right = newNode;
|
||||
if (parent != null)
|
||||
{
|
||||
parent.Right = newNode;
|
||||
}
|
||||
}
|
||||
|
||||
PropagateIncrease(newNode);
|
||||
|
||||
Reference in New Issue
Block a user