diff options
author | Lluis Sanchez <lluis@novell.com> | 2010-03-26 15:04:35 +0300 |
---|---|---|
committer | Lluis Sanchez <lluis@novell.com> | 2010-03-26 15:04:35 +0300 |
commit | e7c6d1236d60db2485d40f618c3f723b6ee488d8 (patch) | |
tree | 89b0865215d3ab97683bacad94f6f3554859612f | |
parent | 28b36103a73ad02e7ea00d151a6cb8a576e6cedc (diff) |
* Mono.Addins.CecilReflector/Reflector.cs: Fix potential NRE.
svn path=/trunk/mono-addins/; revision=154259
-rw-r--r-- | Mono.Addins.CecilReflector/ChangeLog | 4 | ||||
-rw-r--r-- | Mono.Addins.CecilReflector/Mono.Addins.CecilReflector/Reflector.cs | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Mono.Addins.CecilReflector/ChangeLog b/Mono.Addins.CecilReflector/ChangeLog index da29137..919ba37 100644 --- a/Mono.Addins.CecilReflector/ChangeLog +++ b/Mono.Addins.CecilReflector/ChangeLog @@ -1,5 +1,9 @@ 2010-03-26 Lluis Sanchez Gual <lluis@novell.com> + * Mono.Addins.CecilReflector/Reflector.cs: Fix potential NRE. + +2010-03-26 Lluis Sanchez Gual <lluis@novell.com> + * Mono.Addins.CecilReflector.csproj: Flush. 2010-03-26 Lluis Sanchez Gual <lluis@novell.com> diff --git a/Mono.Addins.CecilReflector/Mono.Addins.CecilReflector/Reflector.cs b/Mono.Addins.CecilReflector/Mono.Addins.CecilReflector/Reflector.cs index d4b9428..3cc0d7b 100644 --- a/Mono.Addins.CecilReflector/Mono.Addins.CecilReflector/Reflector.cs +++ b/Mono.Addins.CecilReflector/Mono.Addins.CecilReflector/Reflector.cs @@ -329,7 +329,8 @@ namespace Mono.Addins.CecilReflector AssemblyDefinition GetAssemblyDefinition (TypeDefinition t) { IAnnotationProvider aprov = (IAnnotationProvider) t; - return (AssemblyDefinition) aprov.Annotations [typeof(AssemblyDefinition)]; + AssemblyDefinition ad = (AssemblyDefinition) aprov.Annotations [typeof(AssemblyDefinition)]; + return ad ?? t.Module.Assembly; } public System.Collections.IEnumerable GetBaseTypeFullNameList (object type) |