Fixing a crash related to multiple representation of the same symbol in volsurface relationships
This commit is contained in:
1 parent
552b7dda0a
commit
614552fdad
1 file changed
+2
-1
@@ -17,6 +17,7 @@ using mbts.utils;
|
||||
using mbts.ui.utility;
|
||||
using bts;
|
||||
using bts.api.analytics;
|
||||
using bts.utils;
|
||||
|
||||
namespace mbts.analytics {
|
||||
public class VolSurfaceDriverTheo {
|
||||
@@ -434,7 +435,7 @@ namespace mbts.analytics {
|
||||
/// Puts VolSurfaceSymbolRelationship's into a map of symbol vs its connected symbols
|
||||
private static IDictionary<string, HashSet<string>> _hash_relationship(VolSurfaceSettings vs_settings, IEnumerable<VolSurfaceSymbolRelationship> rels) {
|
||||
rels = rels ?? new VolSurfaceSymbolRelationship[] { };
|
||||
IDictionary<string, HashSet<string>> rv = rels.ToDictionary(r => r.symbol, r => new HashSet<string>(r.connected_symbols.ToArray()));
|
||||
IDictionary<string, HashSet<string>> rv = rels.ToDictionaryDupes(r => r.symbol, r => new HashSet<string>(r.connected_symbols.ToArray()));
|
||||
foreach (string s in VolSurfaceDataFunctions.get_symbols(vs_settings))
|
||||
if (!rv.ContainsKey(s) || rv[s] == null || rv[s].Count == 0)
|
||||
rv.Add(s, new HashSet<string>(new string[] { s }));
|
||||
|
||||
Reference in new issue
Block a user