mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-22 22:37:10 +00:00
misc: chore: Fix numerous NullReferenceExceptions, InvalidOperationExceptions
This commit is contained in:
parent
a90db3464d
commit
d2a532f971
90 changed files with 667 additions and 533 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue