Skip to content

Commit

Permalink
Update flixel/graphics/FlxGraphic.hx
Browse files Browse the repository at this point in the history
Co-authored-by: George Kurelic <[email protected]>
  • Loading branch information
EliteMasterEric and Geokureli authored Jun 13, 2024
1 parent f7ae7e9 commit 246ef59
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions flixel/graphics/FlxGraphic.hx
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,12 @@ class FlxGraphic implements IFlxDestroyable
*/
public inline function getFramesCollections(type:FlxFrameCollectionType):Array<Dynamic>
{
if (this.isDestroyed) return [];

if (this.isDestroyed)
{
FlxG.log.warn('Invalid call to getFramesCollections on a destroyed graphic');
return [];
}

var collections:Array<Dynamic> = frameCollections.get(type);
if (collections == null)
{
Expand Down

0 comments on commit 246ef59

Please sign in to comment.