1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 17:26:02 +08:00

A fix for an ArgumentException error. (#250)

This is the fix proposed by nostravaganza on discord.
It works 100%. Could not reproduce the error again.
This commit is contained in:
Dan Erhardt 2020-04-20 11:21:19 -03:00 committed by GitHub
parent 049a62465c
commit e704b97c77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,8 +74,10 @@ namespace XNodeEditor {
Attribute attr; Attribute attr;
if (!typeTypes.TryGetValue(typeof(T), out attr)) { if (!typeTypes.TryGetValue(typeof(T), out attr)) {
if (GetAttrib<T>(classType, fieldName, out attribOut)) typeTypes.Add(typeof(T), attribOut); if (GetAttrib<T>(classType, fieldName, out attribOut)) {
else typeTypes.Add(typeof(T), null); typeTypes.Add(typeof(T), attribOut);
return true;
} else typeTypes.Add(typeof(T), null);
} }
if (attr == null) { if (attr == null) {