From 6b0ad3191b77fe5ba07c1e23403270f62b81d4ed Mon Sep 17 00:00:00 2001 From: Feiko Date: Wed, 26 Feb 2025 11:06:53 +0100 Subject: [PATCH] fixed nulltypereference error for big .NET helper --- nanoFramework.Serialization.Helper/BinaryFormatter.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nanoFramework.Serialization.Helper/BinaryFormatter.cs b/nanoFramework.Serialization.Helper/BinaryFormatter.cs index f8796e3..71e0946 100644 --- a/nanoFramework.Serialization.Helper/BinaryFormatter.cs +++ b/nanoFramework.Serialization.Helper/BinaryFormatter.cs @@ -1786,6 +1786,11 @@ internal bool AddType(Type t) //Ok, this is really evil. But it's this or 800 exceptions trying to load assemblies through BF.Initialize //This is for dealing with generics + if(t.FullName == null) + { + return false; + } + if (t.FullName.IndexOf('`') >= 0) { return false;