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

Removed crash-inducing assertions with autotiles #1937

Merged
merged 1 commit into from
Dec 14, 2021

Conversation

Semphriss
Copy link
Member

@Semphriss Semphriss commented Dec 14, 2021

Placing a tile outside of a tilemap (for example, when having a tilemap smaller than the sector selected then attempting to autotile outside the bounds of the tilemap) would trigger a failing assert and crash the game. This commit replaces such events with a harmless return statement.

Closes #1934

The PR above misses a few other assertions in the code. This PR takes care of all assertions relating to autotiles, and additionally improves the code quality a bit.

Fixes #1907

Placing a tile outside of a tilemap (for example, when having a tilemap smaller than the sector selected then attempting to autotile outside the bounds of the tilemap) would trigger a failing assert and crash the game. This commit replaces such events with a harmless return statement.
@tobbi tobbi merged commit 31f4309 into SuperTux:master Dec 14, 2021
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.

Crash in level editor when placing air in autotile mode at edge of tilemap
2 participants