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

Already on GitHub? Sign in to your account

Make Game#setScreen accept null #112

Merged
merged 2 commits into from Nov 14, 2012

Conversation

Projects
None yet
3 participants
Contributor

ttencate commented Nov 13, 2012

It starts out with screen == null, so it's silly that it's not possible to get back to that state.

Use case: I have a method that cleans up (disposes) a Screen without knowing which Screen will be next. Naturally, I don't want any references lying around to a disposed screen.

Contributor

Sirrah commented Nov 14, 2012

This has caught me by surprise once as well. I changed my code since I was using Screen in a manner it was not intended for but the proposed behaviour is certainly the least surprising.

@NathanSweet NathanSweet added a commit that referenced this pull request Nov 14, 2012

@NathanSweet NathanSweet Merge pull request #112 from ttencate/master
Make Game#setScreen accept null
c8971d3

@NathanSweet NathanSweet merged commit c8971d3 into libgdx:master Nov 14, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment