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')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c9
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c2
2 files changed, 2 insertions, 9 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 5b323a0a396..adcbc721e80 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -250,7 +250,6 @@ void ED_image_undo_restore(bContext *C, ListBase *lb)
for (tile = lb->first; tile; tile = tile->next) {
short use_float;
- bool need_release = true;
/* find image based on name, pointer becomes invalid with global undo */
if (ima && strcmp(tile->idname, ima->id.name) == 0) {
@@ -269,7 +268,6 @@ void ED_image_undo_restore(bContext *C, ListBase *lb)
* matched file name in list of already loaded images */
BKE_image_release_ibuf(ima, ibuf, NULL);
- need_release = false;
ibuf = BKE_image_get_ibuf_with_name(ima, tile->ibufname);
}
@@ -300,12 +298,7 @@ void ED_image_undo_restore(bContext *C, ListBase *lb)
ibuf->userflags |= IB_MIPMAP_INVALID; /* force mipmap recreatiom */
ibuf->userflags |= IB_DISPLAY_BUFFER_INVALID;
- if (need_release) {
- BKE_image_release_ibuf(ima, ibuf, NULL);
- }
- else {
- IMB_freeImBuf(ibuf);
- }
+ BKE_image_release_ibuf(ima, ibuf, NULL);
}
IMB_freeImBuf(tmpibuf);
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 4b402bc1741..385d1aa57ed 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -598,7 +598,7 @@ static bool project_paint_PickColor(const ProjPaintState *ps, const float pt[2],
}
}
}
- IMB_freeImBuf(ibuf);
+ BKE_image_release_ibuf(ima, ibuf, NULL);
return 1;
}