From 7f80e23a2b72d5ad4ea4a5271217d3e5bab7a509 Mon Sep 17 00:00:00 2001 From: Sara Itani Date: Mon, 14 Sep 2015 17:26:31 -0700 Subject: [PATCH] #369 VS Crash - NullReferenceException in Analysis code --- Nodejs/Product/Analysis/Analysis/Analyzer/AnalysisUnit.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Nodejs/Product/Analysis/Analysis/Analyzer/AnalysisUnit.cs b/Nodejs/Product/Analysis/Analysis/Analyzer/AnalysisUnit.cs index 39cdf2e4e..7cf38ec99 100644 --- a/Nodejs/Product/Analysis/Analysis/Analyzer/AnalysisUnit.cs +++ b/Nodejs/Product/Analysis/Analysis/Analyzer/AnalysisUnit.cs @@ -233,7 +233,8 @@ public override string ToString() { GetHashCode(), Ast != null ? Ast.GetType().Name : "", GetType().Name, - Ast != null ? Ast.GetStart(ProjectEntry.Tree.LocationResolver) : SourceLocation.Invalid + Ast != null && ProjectEntry != null && ProjectEntry.Tree != null ? + Ast.GetStart(ProjectEntry.Tree.LocationResolver) : SourceLocation.Invalid ); }