From c291e3a8f4479d517585d947ea1f751042c3aecd Mon Sep 17 00:00:00 2001 From: VioletSnowLeopard Date: Sun, 13 Apr 2025 08:04:55 -0400 Subject: [PATCH] Improve crash message for attempting to access a destroyed graphic --- flixel/FlxCamera.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flixel/FlxCamera.hx b/flixel/FlxCamera.hx index 6574d832e3..5cb9880258 100644 --- a/flixel/FlxCamera.hx +++ b/flixel/FlxCamera.hx @@ -608,7 +608,7 @@ class FlxCamera extends FlxBasic // TODO: catch this error when the dev actually messes up, not in the draw phase if (graphic.isDestroyed) - throw 'Attempted to queue an invalid FlxDrawItem, did you destroy a cached sprite?'; + throw 'Cannot queue ${graphic.key}. This sprite was destroyed.'; itemToReturn.graphics = graphic; itemToReturn.antialiasing = smooth;