in case of broken configs

This commit is contained in:
icylogic
2016-03-01 22:43:38 +08:00
parent 8f175c481e
commit 11066b7581
@@ -64,7 +64,7 @@ namespace Shadowsocks.Controller.Strategy
{
var name = calculation.Key;
var field = typeof (StatisticsRecord).GetField(name);
dynamic value = field.GetValue(averageRecord);
dynamic value = field?.GetValue(averageRecord);
var factor = calculation.Value;
if (value == null || factor.Equals(0)) continue;
score = score ?? 0;