Fix crash deselecting moved pixels when using certain extensions#5292
Conversation
|
Hi there! One or more of the commit messages in this PR do not match our code submission policy, please check the |
aseprite-bot
left a comment
There was a problem hiding this comment.
clang-tidy made some suggestions
| class EditorState { | ||
| public: | ||
| enum LeaveAction { DiscardState, KeepState }; | ||
| enum LeaveAction { DiscardState, KeepState, IgnoreReentryState }; |
There was a problem hiding this comment.
warning: enum 'LeaveAction' uses a larger base type ('unsigned int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size]
enum LeaveAction { DiscardState, KeepState, IgnoreReentryState };
^|
It works great with Selections. The same should be added for |
Nice catch, it looks like |
…seprite#5280) Although the issue refers to deselecting MovingPixelsState, the same crash could happen when canceling/finishing WritingTextState or MovingSelectionState. This fixes the crash for all these states.
0b0509d to
2ba051b
Compare
|
clang-tidy review says "All clean, LGTM! 👍" |
Fix #5280