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:
authorRolf Bjarne Kvinge <rolf@xamarin.com>2014-04-12 03:55:42 +0400
committerRolf Bjarne Kvinge <rolf@xamarin.com>2014-04-12 04:23:23 +0400
commitc56601ce978a9246eba17e19f1e5c15f49e4f102 (patch)
treeb302164a6d2b9b11703d8f6ce7d63ad2d880fe1e
parentf4a15b8cee24cfeaa0f304589839243be51f5b44 (diff)
Add a null-check to fix a regression in 4de92b7.
The regression (NRE) occurs if null is passed as the argument to an attribute constructor taking a type: [SomeAttribute (null)]
-rw-r--r--Mono.Cecil/AssemblyReader.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Mono.Cecil/AssemblyReader.cs b/Mono.Cecil/AssemblyReader.cs
index 3e1cc30..569475b 100644
--- a/Mono.Cecil/AssemblyReader.cs
+++ b/Mono.Cecil/AssemblyReader.cs
@@ -3119,7 +3119,7 @@ namespace Mono.Cecil {
public TypeReference ReadTypeReference ()
{
string s = ReadUTF8String ();
- if (s.IndexOf ('\\') != -1)
+ if (s != null && s.IndexOf ('\\') != -1)
s = UnescapeTypeName (s);
return TypeParser.ParseType (reader.module, s);
}