From f250b1f5a007a85a646a809a29b706e814f4cf32 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Wed, 15 Apr 2020 13:07:20 +0200 Subject: 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 --- source/blender/editors/space_image/image_undo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/space_image/image_undo.c') diff --git a/source/blender/editors/space_image/image_undo.c b/source/blender/editors/space_image/image_undo.c index 056dd826238..cebf47a385d 100644 --- a/source/blender/editors/space_image/image_undo.c +++ b/source/blender/editors/space_image/image_undo.c @@ -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; -- cgit v1.2.3