fix error propagating NPC sprites if they're not initialised yet
This commit is contained in:
parent
1556a04a54
commit
7a0ef80867
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue