Skip to content

Commit

Permalink
Merge pull request microsoft#595 from mousetraps/i582
Browse files Browse the repository at this point in the history
microsoft#582 VS 2013 Crash NullReferenceException
  • Loading branch information
mousetraps committed Nov 17, 2015
2 parents b2f3b52 + e72249b commit 80a26ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Nodejs/Product/Analysis/Analysis/ModuleTreeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ internal static IEnumerable<ModuleTree> GetChildrenExcludingNodeModules(this Mod
// The process of resolving modules can lead us to add entries into the underlying array
// doing so results in exceptions b/c the array has changed under the enumerable
// To avoid this, we call .ToArray() to create a copy of the array locally which we then Enumerate
return moduleTree.Children.Values.ToArray().Where(mod => !String.Equals(mod.Name, AnalysisConstants.NodeModulesFolder, StringComparison.OrdinalIgnoreCase));
return moduleTree.Children.Values.ToArray().Where(mod => mod != null && !String.Equals(mod.Name, AnalysisConstants.NodeModulesFolder, StringComparison.OrdinalIgnoreCase));
}
}
}

0 comments on commit 80a26ae

Please sign in to comment.