Skip to content

Bugfix: Crash with crop tool

Sharaf Zaman requested to merge szaman/krita:bug-433770-crash-croptool into master

The reason for crash was use after free, and the flow is like this:

  1. User Crops the image (Crop gets added to Undo Stack)
  2. User Undos the Crop (Crop is popped off that stack and is available for Redo)
  3. User makes a Crop Selection
  4. User makes a Redo Action (Because the crop selection is active, prior to the change we would apply the crop stroke which would purge the Redo Stack, deleting the KisSavedMacroCommand* which later would be used in KisSavedCommandBase::runStroke [its vtable]).

Since there is no stroke running during selection, we only have to clear the selection.

BUG:433770

Merge request reports

Loading