修复空指针的问题
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user