Update runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Atn/SingletonPredictionContext.cs

NullReferenceException in CSharp target #2304
This commit is contained in:
Andreas Skaar 2018-10-08 22:05:05 +02:00
parent 03a0a40835
commit 10f8cac7f4
1 changed files with 1 additions and 1 deletions

View File

@ -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()