File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -380,7 +380,7 @@ class FunkinSprite extends FlxAnimate
380380 */
381381 public function hasAnimation (id : String ): Bool
382382 {
383- var animationList : Array <String > = this .animation .getNameList ();
383+ var animationList : Array <String > = this .animation ? .getNameList () ?? [] ;
384384 if (animationList .contains (id ))
385385 {
386386 return true ;
@@ -424,7 +424,7 @@ class FunkinSprite extends FlxAnimate
424424 */
425425 public function getCurrentAnimation (): String
426426 {
427- return this .animation .curAnim ?. name ?? ' ' ;
427+ return this .animation ? .curAnim ?. name ?? ' ' ;
428428 }
429429
430430 /**
@@ -461,7 +461,7 @@ class FunkinSprite extends FlxAnimate
461461 public function listAnimations (): Array <String >
462462 {
463463 var frameLabels : Array <String > = getFrameLabelList ();
464- var animationList : Array <String > = this .animation .getNameList ();
464+ var animationList : Array <String > = this .animation ? .getNameList () ?? [] ;
465465
466466 return frameLabels .concat (animationList );
467467 }
You can’t perform that action at this time.
0 commit comments