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:
Diffstat (limited to 'source/blender/editors/space_image/image_undo.c')
-rw-r--r--source/blender/editors/space_image/image_undo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_image/image_undo.c b/source/blender/editors/space_image/image_undo.c
index 8c5e2ee2f8a..6cbebd2a959 100644
--- a/source/blender/editors/space_image/image_undo.c
+++ b/source/blender/editors/space_image/image_undo.c
@@ -883,9 +883,7 @@ static bool image_undosys_step_encode(struct bContext *C,
}
}
else {
- if (C == NULL) {
- return false;
- }
+ BLI_assert(C != NULL);
/* 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));
@@ -998,6 +996,8 @@ void ED_image_undosys_type(UndoType *ut)
ut->step_foreach_ID_ref = image_undosys_foreach_ID_ref;
+ /* NOTE this is actually a confusing case, since it expects a valid context, but only in a
+ * specific case, see `image_undosys_step_encode` code. */
ut->use_context_for_encode = false;
ut->step_size = sizeof(ImageUndoStep);