diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-01-30 16:33:11 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-02-07 22:43:35 -0500 |
commit | 7a0ef8086724d31f4145442addb2d40a1b744e6d (patch) | |
tree | b1015912dd6750dfdb877d2e7052678c9164d633 | |
parent | 1556a04a5470d520970bdf0c19f786d02e51bc7f (diff) | |
download | SMAPI-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.cs | 2 |
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; |