From 7a0ef8086724d31f4145442addb2d40a1b744e6d Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 30 Jan 2019 16:33:11 -0500 Subject: fix error propagating NPC sprites if they're not initialised yet --- src/SMAPI/Metadata/CoreAssetPropagator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/SMAPI/Metadata/CoreAssetPropagator.cs b/src/SMAPI/Metadata/CoreAssetPropagator.cs index 92968271..53d930f5 100644 --- a/src/SMAPI/Metadata/CoreAssetPropagator.cs +++ b/src/SMAPI/Metadata/CoreAssetPropagator.cs @@ -529,7 +529,7 @@ namespace StardewModdingAPI.Metadata { // get NPCs NPC[] characters = this.GetCharacters() - .Where(npc => this.GetNormalisedPath(npc.Sprite.textureName.Value) == key) + .Where(npc => npc.Sprite != null && this.GetNormalisedPath(npc.Sprite.textureName.Value) == key) .ToArray(); if (!characters.Any()) return false; -- cgit