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 moving pixels from tilemap with inexistent tiles #4093

Conversation

martincapello
Copy link
Member

Prevent crash when in Auto or Stack mode the user tries to move pixels from a tilemap with inexistent tiles.
Fix #4071

Copy link
Member

@Gasparoken Gasparoken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works great. Curly braces can be omitted but it's optional, so LGTM.

@martincapello martincapello assigned dacap and unassigned martincapello Oct 12, 2023
@dacap
Copy link
Member

dacap commented Oct 12, 2023

I'll merge this as it is, as Gaspar said for one line continue/break statements it's preferred to avoid braces.

@dacap dacap merged commit fc29686 into aseprite:main Oct 12, 2023
7 checks passed
@martincapello
Copy link
Member Author

Alright...maybe I should have kept the comment?...since this was a copy of the same if block in line 661...

@dacap
Copy link
Member

dacap commented Oct 13, 2023

Alright...maybe I should have kept the comment?...since this was a copy of the same if block in line 661...

Actually I think there is still a bug with this fix: the auto mode start failing when we paint in non-existent tiles (it does nothing). That is the expected behavior in Manual mode, as the comment in line 662 says (which is a TODO for a possible future Manual mode filling empty tiles), but for Auto it should paint.

I'll create a new issue in a couple of weeks about this.

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 on doc::Image::createCopy: Probably when moving/cut the selection in a tilemap layer
3 participants