Update runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Atn/SingletonPredictionContext.cs
NullReferenceException in CSharp target #2304
This commit is contained in:
parent
03a0a40835
commit
10f8cac7f4
|
@ -79,7 +79,7 @@ namespace Antlr4.Runtime.Atn
|
|||
return false;
|
||||
}
|
||||
Antlr4.Runtime.Atn.SingletonPredictionContext other = (Antlr4.Runtime.Atn.SingletonPredictionContext)o;
|
||||
return returnState == other.returnState && parent.Equals(other.parent);
|
||||
return returnState == other.returnState && (parent != null && parent.Equals(other.parent));
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
|
Loading…
Reference in New Issue