Browse Source

in case of broken configs

tags/3.0
icylogic 9 years ago
parent
commit
11066b7581
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      shadowsocks-csharp/Controller/Strategy/StatisticsStrategy.cs

+ 1
- 1
shadowsocks-csharp/Controller/Strategy/StatisticsStrategy.cs View File

@@ -64,7 +64,7 @@ namespace Shadowsocks.Controller.Strategy
{ {
var name = calculation.Key; var name = calculation.Key;
var field = typeof (StatisticsRecord).GetField(name); var field = typeof (StatisticsRecord).GetField(name);
dynamic value = field.GetValue(averageRecord);
dynamic value = field?.GetValue(averageRecord);
var factor = calculation.Value; var factor = calculation.Value;
if (value == null || factor.Equals(0)) continue; if (value == null || factor.Equals(0)) continue;
score = score ?? 0; score = score ?? 0;


Loading…
Cancel
Save