Skip to content

Commit

Permalink
remove events to avoid crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
DetectiveBaldi committed Dec 1, 2024
1 parent c0cccb4 commit 16c10b5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flixel/input/FlxKeyManager.hx
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ class FlxKeyManager<Key:Int, KeyList:FlxBaseKeyList> implements IFlxInputManager
*/
public function destroy():Void
{
FlxG.stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
FlxG.stage.removeEventListener(KeyboardEvent.KEY_UP, onKeyUp);

_keyListArray = null;
_keyListMap = null;
}
Expand Down

0 comments on commit 16c10b5

Please sign in to comment.