Page MenuHome

Unpaired ED_image_undo_push_begin(..) T80885
AbandonedPublic

Authored by Martijn Versteegh (Baardaap) on Sep 17 2020, 11:06 PM.

Details

Reviewers
None
Group Reviewers
Sculpt, Paint & Texture
Summary

In the file source/blender/editors/sculpt_paint/paint_image_proj.c line 6094 in the function texture_paint_camera_project_exec(...):

ED_image_undo_push_begin(op->type->name, PAINT_MODE_TEXTURE_3D)

is called, but it is not paired with

ED_image_undo_push_end();

this patch adds a call to ED_image_undo_push_end() right before the return OPERATOR_FINISHED;

This seems to work and have no ill side effects, but I'm not sure it is completely correct, as the function can still return with OPERATOR_CANCELLED earlier and I'm not sure if ED_image_undo_push_end() should be called then as well.

Diff Detail

Repository
rB Blender

Event Timeline

Martijn Versteegh (Baardaap) requested review of this revision.Sep 17 2020, 11:06 PM
Martijn Versteegh (Baardaap) created this revision.

Thanks for the patch, I looked into this and cancelling after ED_image_undo_push_begin is indeed an issue.

Resolved rBe6978f4d63d1: Fix T80885: Texture paint camera project crashes after undo/redo with updated comments to make it clear how these functions should be used.