[Bf-blender-cvs] [08274433e1b] master: Fix T55912: saving Viewer Node image error.

Bastien Montagne noreply at git.blender.org
Wed Jul 11 14:35:03 CEST 2018


Commit: 08274433e1bd9db5a2a27e5d2f8862e9cc3f27f0
Author: Bastien Montagne
Date:   Wed Jul 11 14:32:43 2018 +0200
Branches: master
https://developer.blender.org/rB08274433e1bd9db5a2a27e5d2f8862e9cc3f27f0

Fix T55912: saving Viewer Node image error.

Images from viewer node needs the lock parameter...

===================================================================

M	source/blender/makesrna/intern/rna_image_api.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index 916ba660249..b6ba06a84d5 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -118,7 +118,9 @@ static void rna_Image_save_render(Image *image, bContext *C, ReportList *reports
 
 static void rna_Image_save(Image *image, Main *bmain, bContext *C, ReportList *reports)
 {
-	ImBuf *ibuf = BKE_image_acquire_ibuf(image, NULL, NULL);
+	void *lock;
+
+	ImBuf *ibuf = BKE_image_acquire_ibuf(image, NULL, &lock);
 	if (ibuf) {
 		char filename[FILE_MAX];
 		BLI_strncpy(filename, image->name, sizeof(filename));
@@ -145,7 +147,7 @@ static void rna_Image_save(Image *image, Main *bmain, bContext *C, ReportList *r
 		BKE_reportf(reports, RPT_ERROR, "Image '%s' does not have any image data", image->id.name + 2);
 	}
 
-	BKE_image_release_ibuf(image, ibuf, NULL);
+	BKE_image_release_ibuf(image, ibuf, &lock);
 	WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, image);
 }



More information about the Bf-blender-cvs mailing list