mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Only setting value if we can write them, this solved a problem with cloneTo for an ini configuration object.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1622 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
affbfb0ce6
commit
2ba4b6f838
1 changed files with 3 additions and 1 deletions
|
@ -63,7 +63,9 @@ namespace GreenshotPlugin.Core {
|
|||
PropertyInfo[] myObjectProperties = type.GetProperties(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance);
|
||||
|
||||
foreach (PropertyInfo pi in myObjectProperties) {
|
||||
pi.SetValue(destination, pi.GetValue(source, null), null);
|
||||
if (pi.CanWrite) {
|
||||
pi.SetValue(destination, pi.GetValue(source, null), null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue