Fix for a crash after undo "Mask slice to new object" When creating a new mesh object in the mask slice operator in sculpt mode it caused a crash when undo to the initial undo step. Moreover saving the sculpt undo state seems not necessary in this function since undo/redo doesn't really work reliably for this operator from the start, but there is nothing can be done about it without systemic changes. Note: this PR replaces #119401 Pull Request: https://projects.blender.org/blender/blender/pulls/119443