Skip to content

Commit

Permalink
adding check for null namespace
Browse files Browse the repository at this point in the history
yes, it can happen, I don't know how
  • Loading branch information
Eduardo Pignatelli authored and adecler committed Aug 28, 2019
1 parent c0ed474 commit b835317
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Reflection_Engine/Convert/ToText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static string ToText(this Type type, bool includePath = false, bool repla
{
Type[] types = type.GetGenericArguments();

if (replaceGeneric && types.Count() == 1 && !type.Namespace.StartsWith("BH"))
if (replaceGeneric && types.Count() == 1 && type.Namespace != null && !type.Namespace.StartsWith("BH"))
return types[0].ToText(includePath, replaceGeneric);
else
{
Expand Down

0 comments on commit b835317

Please sign in to comment.