Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/cecil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Mono.Cecil/TypeParser.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/Mono.Cecil/TypeParser.cs b/Mono.Cecil/TypeParser.cs
index 33ffb60..3345aa7 100644
--- a/Mono.Cecil/TypeParser.cs
+++ b/Mono.Cecil/TypeParser.cs
@@ -390,8 +390,13 @@ namespace Mono.Cecil {
var nested_names = type_info.nested_names;
if (!nested_names.IsNullOrEmpty ()) {
- for (int i = 0; i < nested_names.Length; i++)
- typedef = typedef.GetNestedType (nested_names [i]);
+ for (int i = 0; i < nested_names.Length; i++) {
+ var nested_type = typedef.GetNestedType (nested_names [i]);
+ if (nested_type == null)
+ return false;
+
+ typedef = nested_type;
+ }
}
type = typedef;