Skip to content

Commit e356bd2

Browse files
Improve crash message for attempting to access a destroyed graphic (#3417)
1 parent 200d7cd commit e356bd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flixel/FlxCamera.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ class FlxCamera extends FlxBasic
608608

609609
// TODO: catch this error when the dev actually messes up, not in the draw phase
610610
if (graphic.isDestroyed)
611-
throw 'Attempted to queue an invalid FlxDrawItem, did you destroy a cached sprite?';
611+
throw 'Cannot queue ${graphic.key}. This sprite was destroyed.';
612612

613613
itemToReturn.graphics = graphic;
614614
itemToReturn.antialiasing = smooth;

0 commit comments

Comments
 (0)