diff --git a/source/funkin/editors/character/CharacterAnimsWindow.hx b/source/funkin/editors/character/CharacterAnimsWindow.hx index b91e13af..d2f2de04 100644 --- a/source/funkin/editors/character/CharacterAnimsWindow.hx +++ b/source/funkin/editors/character/CharacterAnimsWindow.hx @@ -108,7 +108,8 @@ class CharacterAnimsWindow extends UIButtonList { if (newButton.valid) { XMLUtil.addAnimToSprite(character, animData); - buildAnimDisplay(animData.name, character.animation._animations[animData.name]); + if (character.animation._animations[animData.name] != null) + buildAnimDisplay(animData.name, character.animation._animations[animData.name]); } } diff --git a/source/funkin/editors/character/CharacterGhost.hx b/source/funkin/editors/character/CharacterGhost.hx index 141c533d..bb9509b9 100644 --- a/source/funkin/editors/character/CharacterGhost.hx +++ b/source/funkin/editors/character/CharacterGhost.hx @@ -23,10 +23,9 @@ class CharacterGhost extends Character { } frame = frames.frames[animation.frameIndex]; + setAnimOffset(animation.name); + alpha = 1; color = 0xFFFFFFFF; } - - setAnimOffset(animation.name); - alpha = 1; color = 0xFFFFFFFF; ghostDraw = false; super.draw();