From f58cdde981f7dfabb5783c80b29f4996d76cec30 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 2 Apr 2022 15:12:05 -0400 Subject: fix errors due to null asset names in asset propagation --- src/SMAPI/Metadata/CoreAssetPropagator.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/SMAPI/Metadata/CoreAssetPropagator.cs b/src/SMAPI/Metadata/CoreAssetPropagator.cs index 424abc18..159e19fd 100644 --- a/src/SMAPI/Metadata/CoreAssetPropagator.cs +++ b/src/SMAPI/Metadata/CoreAssetPropagator.cs @@ -1238,6 +1238,9 @@ namespace StardewModdingAPI.Metadata /// The second value to compare. private bool IsSameBaseName(IAssetName left, string right) { + if (left is null || right is null) + return false; + IAssetName parsedB = this.ParseAssetNameOrNull(right); return this.IsSameBaseName(left, parsedB); } @@ -1247,6 +1250,9 @@ namespace StardewModdingAPI.Metadata /// The second value to compare. private bool IsSameBaseName(IAssetName left, IAssetName right) { + if (left is null || right is null) + return false; + return left.IsEquivalentTo(right.BaseName, useBaseName: true); } -- cgit