Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2021-01-06 16:09:58 +0300
committerBastien Montagne <bastien@blender.org>2021-01-06 16:11:25 +0300
commit0e4f8ed90ee0823307a2070812e2b9cfbced7bdd (patch)
tree85978ae308fa82a96cb1ba745698351f63b0a3bf /source/blender/editors/space_image
parenteb1ff4b3a4cfb933f40206fb9c0ea918d79456a5 (diff)
UndoType: Fix some incinsistencies re context usage flag.
`use_context_for_encode` was not properly set regarding actual `encode` code for a few types.
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/image_undo.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_image/image_undo.c b/source/blender/editors/space_image/image_undo.c
index 2c8b0f2e0cf..8c5e2ee2f8a 100644
--- a/source/blender/editors/space_image/image_undo.c
+++ b/source/blender/editors/space_image/image_undo.c
@@ -883,6 +883,9 @@ static bool image_undosys_step_encode(struct bContext *C,
}
}
else {
+ if (C == NULL) {
+ return false;
+ }
/* Happens when switching modes. */
ePaintMode paint_mode = BKE_paintmode_get_active_from_context(C);
BLI_assert(ELEM(paint_mode, PAINT_MODE_TEXTURE_2D, PAINT_MODE_TEXTURE_3D));
@@ -995,7 +998,7 @@ void ED_image_undosys_type(UndoType *ut)
ut->step_foreach_ID_ref = image_undosys_foreach_ID_ref;
- ut->use_context_for_encode = true;
+ ut->use_context_for_encode = false;
ut->step_size = sizeof(ImageUndoStep);
}