From 300b7827a097fd204972711daa2037d4bf7ea22e Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Tue, 7 Sep 2021 23:41:16 +0200 Subject: [PATCH] Nullability fixes --- src/EFCore.Sqlite.Core/Infrastructure/SpatialiteLoader.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EFCore.Sqlite.Core/Infrastructure/SpatialiteLoader.cs b/src/EFCore.Sqlite.Core/Infrastructure/SpatialiteLoader.cs index eaac6d0250c..cb7dece454d 100644 --- a/src/EFCore.Sqlite.Core/Infrastructure/SpatialiteLoader.cs +++ b/src/EFCore.Sqlite.Core/Infrastructure/SpatialiteLoader.cs @@ -127,7 +127,7 @@ private static void FindExtension() var candidateAssets = new Dictionary<(string, string), int>(); var rid = RuntimeInformation.RuntimeIdentifier; var rids = DependencyContext.Default!.RuntimeGraph.FirstOrDefault(g => g.Runtime == rid)?.Fallbacks.ToList() - ?? new List(); + ?? new List(); rids.Insert(0, rid); foreach (var library in DependencyContext.Default.RuntimeLibraries) @@ -142,7 +142,7 @@ private static void FindExtension() StringComparison.OrdinalIgnoreCase)) { var fallbacks = rids.IndexOf(group.Runtime); - if (fallbacks != -1) + if (fallbacks != -1 && library.Path is not null) { candidateAssets.Add((library.Path, file.Path), fallbacks); }