diff options
author | Jeroen Bakker <jeroen@blender.org> | 2022-05-25 09:46:18 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2022-05-25 09:46:18 +0300 |
commit | 08324ba2c1cd6427466e8f08a2b0b476ff9b32f6 (patch) | |
tree | 79f8cee207dc7750ae2b28c385f1b4ae12b6a763 /source/blender | |
parent | e69f3d7db17893c2153ec8395db1168d6fc7608e (diff) |
Fix T98350: Crash when using clone tool + sequence.
When no image user is known the last used frame of the image is used to
read a frame. When partial updating an image there is always an image user
that would use a zerod out image user, meaning the frame number is set to 0
when using the clone tool.
This fix syncs the frame with the last used frame of the image to ensure
that the buffer exists. There is a bailout in the overlay_edit_uv.c.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/BKE_image_partial_update.hh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_image_partial_update.hh b/source/blender/blenkernel/BKE_image_partial_update.hh index 393bf003caa..6611efe7a61 100644 --- a/source/blender/blenkernel/BKE_image_partial_update.hh +++ b/source/blender/blenkernel/BKE_image_partial_update.hh @@ -172,6 +172,11 @@ class ImageTileData : AbstractTileData { if (image_user != nullptr) { this->image_user = *image_user; } + else { + /* When no image user is given the lastframe of the image should be used. This reflect the + * same logic when using a stencil image in the clone tool. */ + this->image_user.framenr = image->lastframe; + } } void init_data(TileNumber new_tile_number) override |