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

github.com/mono/ikvm-fork.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjfrijters <jfrijters>2010-05-07 18:03:40 +0400
committerjfrijters <jfrijters>2010-05-07 18:03:40 +0400
commit8e478a9f06ae7693666fc43d566666a8e2f5c3b9 (patch)
tree464f56f0c7cc6918e9b92fa78b9aec628427ff5e /reflect/Type.cs
parent188f4deac7f0f397bb86a1aad3fd2578ceebf68c (diff)
Added null check.
Diffstat (limited to 'reflect/Type.cs')
-rw-r--r--reflect/Type.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/reflect/Type.cs b/reflect/Type.cs
index cb998630..5fc71f0c 100644
--- a/reflect/Type.cs
+++ b/reflect/Type.cs
@@ -1891,7 +1891,9 @@ namespace IKVM.Reflection
private static bool IsEmpty(Type[][] mods, int i)
{
- return mods == null || mods[i].Length == 0;
+ // we need to be extra careful, because mods doesn't not need to be in canonical format
+ // (Signature.ReadGenericInst() calls Make() directly, without copying the modifier arrays)
+ return mods == null || mods[i] == null || mods[i].Length == 0;
}
private GenericTypeInstance(Type type, Type[] args, Type[][] requiredCustomModifiers, Type[][] optionalCustomModifiers)