fix: Add null check for sec metadata in MDDaemon

This commit is contained in:
John Colvin committed 2022-05-25 14:19:03 -04:00
1 parent 96ad67b020
commit 5999e7856f
1 file changed
+4 -2
+4 -2
View File
@@ -135,11 +135,13 @@ namespace bts {
if (item is null) {
throw new InvalidOperationException("Expected non-null SecurityMetadataItem");
}
var price_display = item.Value.PriceDisplay;
var qty_display = item.Value.QuantityDisplay;
exch_secs[smd.id] = new(
smd.security,
smd.md,
new(item.Value.PriceDisplay),
new(item.Value.QuantityDisplay));
price_display is null ? null : new(price_display),
qty_display is null ? null : new(qty_display));
}
}
_bus.post(SparkTags.ServerSecuritiesTag, exch_secs);