diff --git a/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.cpp b/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.cpp index 7dcc011d1d..b76e0d2726 100755 --- a/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.cpp +++ b/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.cpp @@ -22,6 +22,10 @@ namespace { } bool predictionContextEqual(const Ref &lhs, const Ref &rhs) { + if (lhs == nullptr) + return rhs == nullptr; + else if (rhs == nullptr) + return false; return *lhs == *rhs; }