修复一个可能存在的null引用问题

This commit is contained in:
falcon 2022-04-08 09:57:01 +08:00
parent 520abc3454
commit e16e28da2d

View File

@ -154,7 +154,9 @@ namespace Falcon.SugarApi.DatabaseDefinitions
var type = types[i];
if (!InitdTable.Any(m => m == type.FullName)) {
this.CodeFirst.BackupTable().SetStringDefaultLength(200).InitTables(type);
InitdTable.Add(type.FullName);
if (type.FullName != null) {
InitdTable.Add(type.FullName);
}
}
}