Fix assert for Image Editor invert/resize operators
Caused by rB2bf4c74130ff. For undo, the ImageUser's scene should be NULL (see D7022 for discussion). PaintTiles were already doing it beforehand in ED_image_paint_tile_push, but Image ops [scale/invert] are calling ED_image_undo_push_begin_with_image directly. Now actually set the UndoImageHandle iuser.scene to NULL (rather than asserting) ref T75675 Maniphest Tasks: T75675 Differential Revision: https://developer.blender.org/D7435
This commit is contained in:
parent
54736d5058
commit
f250b1f5a0
Notes:
blender-bot
2023-02-14 09:38:57 +01:00
Referenced by issue #75675, Image editor assert when image is unlinked [with setting users to zero]
|
@ -667,7 +667,7 @@ static UndoImageHandle *uhandle_add(ListBase *undo_handles, Image *image, ImageU
|
|||
UndoImageHandle *uh = MEM_callocN(sizeof(*uh), __func__);
|
||||
uh->image_ref.ptr = image;
|
||||
uh->iuser = *iuser;
|
||||
BLI_assert(uh->iuser.scene == NULL);
|
||||
uh->iuser.scene = NULL;
|
||||
uh->iuser.ok = 1;
|
||||
BLI_addtail(undo_handles, uh);
|
||||
return uh;
|
||||
|
|
Loading…
Reference in New Issue