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:
authorSybren A. Stüvel <sybren@blender.org>2022-02-21 15:06:28 +0300
committerSybren A. Stüvel <sybren@blender.org>2022-02-21 15:06:28 +0300
commitd076e9468c43546ab4948c1ecf6d28c1be0c60c8 (patch)
tree733fef1c22a05d2ce1dd7de60e414293cecd42b5
parente2ffe88983938651a641e3d1be65f43c65a54901 (diff)
parent132f9a2e318da5de7432c78fa3b3084c9ec38a40 (diff)
Merge remote-tracking branch 'origin/blender-v3.1-release'
-rw-r--r--source/blender/blenkernel/intern/anim_data.c2
-rw-r--r--source/blender/draw/engines/image/image_drawing_mode.hh11
2 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/anim_data.c b/source/blender/blenkernel/intern/anim_data.c
index 0c9202400ad..861a89ea9d7 100644
--- a/source/blender/blenkernel/intern/anim_data.c
+++ b/source/blender/blenkernel/intern/anim_data.c
@@ -763,7 +763,7 @@ static bool fcurves_path_rename_fix(ID *owner_id,
if (fcu->rna_path != old_path) {
bActionGroup *agrp = fcu->grp;
is_changed = true;
- if ((agrp != NULL) && STREQ(oldName, agrp->name)) {
+ if (oldName != NULL && (agrp != NULL) && STREQ(oldName, agrp->name)) {
BLI_strncpy(agrp->name, newName, sizeof(agrp->name));
}
}
diff --git a/source/blender/draw/engines/image/image_drawing_mode.hh b/source/blender/draw/engines/image/image_drawing_mode.hh
index 6ab1bffb3e1..b9de0838fef 100644
--- a/source/blender/draw/engines/image/image_drawing_mode.hh
+++ b/source/blender/draw/engines/image/image_drawing_mode.hh
@@ -208,7 +208,7 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD
if (iterator.tile_data.tile_buffer == nullptr) {
continue;
}
- ensure_float_buffer(*iterator.tile_data.tile_buffer);
+ const bool do_free_float_buffer = ensure_float_buffer(*iterator.tile_data.tile_buffer);
const float tile_width = static_cast<float>(iterator.tile_data.tile_buffer->x);
const float tile_height = static_cast<float>(iterator.tile_data.tile_buffer->y);
@@ -314,6 +314,10 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD
0);
imb_freerectImbuf_all(&extracted_buffer);
}
+
+ if (do_free_float_buffer) {
+ imb_freerectfloatImBuf(iterator.tile_data.tile_buffer);
+ }
}
}
@@ -389,10 +393,7 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD
{
const int texture_width = texture_buffer.x;
const int texture_height = texture_buffer.y;
- const bool float_buffer_created = ensure_float_buffer(tile_buffer);
- /* TODO(jbakker): Find leak when rendering VSE and don't free here. */
- const bool do_free_float_buffer = float_buffer_created &&
- instance_data.image->type == IMA_TYPE_R_RESULT;
+ const bool do_free_float_buffer = ensure_float_buffer(tile_buffer);
/* IMB_transform works in a non-consistent space. This should be documented or fixed!.
* Construct a variant of the info_uv_to_texture that adds the texel space