Counting the amount of surface objects, so we can see if there are multiple in memory when we have bugs.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2365 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-12-07 15:12:04 +00:00
parent 1a471ec77f
commit 83d244c3bf
5 changed files with 116 additions and 140 deletions

View file

@ -305,7 +305,12 @@ namespace Greenshot.IniFile {
Value = defaultValueFromConfig;
return;
}
Value = Activator.CreateInstance(ValueType);
try {
Value = Activator.CreateInstance(ValueType);
} catch (Exception) {
LOG.WarnFormat("Couldn't create instance of {0} for {1}, using default value.", ValueType.FullName, attributes.Name);
Value = default(ValueType);
}
}
/// <summary>