mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-25 23:07:56 +02:00
misc: chore: Fix numerous NullReferenceExceptions, InvalidOperationExceptions
This commit is contained in:
@@ -162,7 +162,7 @@ namespace Spv.Generator
|
||||
|
||||
public bool Equals(Instruction cmpObj)
|
||||
{
|
||||
bool result = Type == cmpObj.Type && Id == cmpObj.Id;
|
||||
bool result = cmpObj != null && Type == cmpObj.Type && Id == cmpObj.Id;
|
||||
|
||||
if (result)
|
||||
{
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace Spv.Generator
|
||||
|
||||
public bool Equals(LiteralInteger cmpObj)
|
||||
{
|
||||
return Type == cmpObj.Type && _integerType == cmpObj._integerType && _data == cmpObj._data;
|
||||
return cmpObj != null && Type == cmpObj.Type && _integerType == cmpObj._integerType && _data == cmpObj._data;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Spv.Generator
|
||||
|
||||
public bool Equals(LiteralString cmpObj)
|
||||
{
|
||||
return Type == cmpObj.Type && _value.Equals(cmpObj._value);
|
||||
return cmpObj != null && Type == cmpObj.Type && _value.Equals(cmpObj._value);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
|
||||
Reference in New Issue
Block a user