Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent crash when hiding debug windows #2725

Merged
merged 1 commit into from
Feb 6, 2023
Merged

prevent crash when hiding debug windows #2725

merged 1 commit into from
Feb 6, 2023

Conversation

Geokureli
Copy link
Member

@Geokureli Geokureli commented Feb 6, 2023

While it's still not recommended to call FlxG.save.bind, this prevents a crash when you hide a debug window while using a custom save path on FlxG.save.

Note: if you set FlxG.save to a custom path after the FlxGame is created, you'll still have other problems, since you're saving flixel settings to a different file than the one you're loading. This just prevents a crash.

It's still recommended to either

  1. use the default path and never call bind on FlxG.save
  2. call FlxG.save.bind before the FlxGame constructor is called
  3. use a different FlxSave instance than FlxG.save to save your game data and let flixel use FlxG.save for built in features

@Geokureli Geokureli merged commit 2f43fc7 into dev Feb 6, 2023
Geokureli added a commit that referenced this pull request Feb 6, 2023
@chosencharacters
Copy link

<3

@Geokureli Geokureli deleted the window_save branch March 10, 2023 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants