修复空指针的问题

This commit is contained in:
2025-07-03 13:22:01 +08:00
parent eaffc6da5c
commit 38ddeafad5

View File

@@ -94,8 +94,12 @@ public static class ObjectExtensions
tObj=Activator.CreateInstance(targetProperty.PropertyType);
}
CopyTo(sObj,tObj);
targetProperty.SetValue(ttarget,tObj);
if (sObj!=null && tObj!=null)
{
CopyTo(sObj,tObj);
targetProperty.SetValue(ttarget,tObj);
}
}
}
}