diff --git a/src/client/spark/view/Converters/DictionaryLookupConverter.cs b/src/client/spark/view/Converters/DictionaryLookupConverter.cs index 4cbf384d1..149e9f8d0 100644 --- a/src/client/spark/view/Converters/DictionaryLookupConverter.cs +++ b/src/client/spark/view/Converters/DictionaryLookupConverter.cs @@ -3,13 +3,14 @@ using System.Collections; using System.Collections.Generic; using System.Globalization; using System.Linq; +using System.Threading; using System.Windows.Data; namespace mbts.ui.converters { class DictionaryLookupConverter : IMultiValueConverter { - [ThreadStatic] Dictionary _type_impls_backing; - Dictionary _type_impls => _type_impls_backing ?? (_type_impls_backing = new Dictionary()); + Dictionary _type_impls => + Interlocked.CompareExchange(ref _type_impls_backing, new(), null); delegate bool Lookup(object source, object key, out object result);