diff --git a/source/funkin/graphics/FunkinSprite.hx b/source/funkin/graphics/FunkinSprite.hx index ffbd63fab..bfd2e8028 100644 --- a/source/funkin/graphics/FunkinSprite.hx +++ b/source/funkin/graphics/FunkinSprite.hx @@ -214,6 +214,7 @@ class FunkinSprite extends FlxSprite for (graphicKey in previousCachedTextures.keys()) { var graphic = previousCachedTextures.get(graphicKey); + if (graphic == null) continue; FlxG.bitmap.remove(graphic); graphic.destroy(); previousCachedTextures.remove(graphicKey);