Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit cc04f8f

Browse files
committed
Attempt to fix NullReferenceException in ILSpySymbolSource.GetLocalVariables().
1 parent fc13481 commit cc04f8f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/AddIns/DisplayBindings/ILSpyAddIn/ILSpySymbolSource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public IEnumerable<ILLocalVariable> GetLocalVariables(IMethod method)
102102
var context = new SimpleTypeResolveContext(method);
103103
var loader = new CecilLoader();
104104

105-
return symbols.LocalVariables.Select(
105+
return symbols.LocalVariables.Where(v => v.OriginalVariable != null).Select(
106106
v => new Debugger.ILLocalVariable() {
107107
Index = v.OriginalVariable.Index,
108108
Type = loader.ReadTypeReference(v.Type).Resolve(context),

0 commit comments

Comments
 (0)