summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-01-30 16:33:11 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-02-07 22:43:35 -0500
commit7a0ef8086724d31f4145442addb2d40a1b744e6d (patch)
treeb1015912dd6750dfdb877d2e7052678c9164d633
parent1556a04a5470d520970bdf0c19f786d02e51bc7f (diff)
downloadSMAPI-7a0ef8086724d31f4145442addb2d40a1b744e6d.tar.gz
SMAPI-7a0ef8086724d31f4145442addb2d40a1b744e6d.tar.bz2
SMAPI-7a0ef8086724d31f4145442addb2d40a1b744e6d.zip
fix error propagating NPC sprites if they're not initialised yet
-rw-r--r--src/SMAPI/Metadata/CoreAssetPropagator.cs2
1 files changed, 1 insertions, 1 deletions
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;