Browse Source

fixed possible NREs in VB decompiler

pull/422/head
Siegfried Pammer 12 years ago
parent
commit
7ce68392de
  1. 4
      ILSpy/VB/ILSpyEnvironmentProvider.cs

4
ILSpy/VB/ILSpyEnvironmentProvider.cs

@ -88,7 +88,7 @@ namespace ICSharpCode.ILSpy.VB @@ -88,7 +88,7 @@ namespace ICSharpCode.ILSpy.VB
{
var annotation = expression.Annotations.OfType<TypeInformation>().FirstOrDefault();
if (annotation == null)
if (annotation == null || annotation.InferredType == null)
return TypeCode.Object;
var definition = annotation.InferredType.Resolve();
@ -113,7 +113,7 @@ namespace ICSharpCode.ILSpy.VB @@ -113,7 +113,7 @@ namespace ICSharpCode.ILSpy.VB
var annotation = expression.Annotations.OfType<TypeInformation>().FirstOrDefault();
if (annotation == null)
if (annotation == null || annotation.InferredType == null)
return null;
var definition = annotation.InferredType.Resolve();

Loading…
Cancel
Save