Add null check in Indexer[object]
authoriSazonov <darpa@yandex.ru>
Tue, 28 Aug 2018 15:26:58 +0000 (20:26 +0500)
committeriSazonov <darpa@yandex.ru>
Tue, 28 Aug 2018 15:41:52 +0000 (20:41 +0500)
Commit migrated from https://github.com/dotnet/corefx/commit/c40082d2fed89b34b66a41a11e9e5b0b903c407d

src/libraries/System.Collections.Specialized/src/System/Collections/Specialized/OrderedDictionary.cs

index 4591671..27e58a0 100644 (file)
@@ -208,6 +208,10 @@ namespace System.Collections.Specialized
         {
             get
             {
+                if (_objectsTable == null)
+                {
+                    return null;
+                }
                 return objectsTable[key];
             }
             set