[Bf-blender-cvs] [22dc248f14b] master: Fix T56610: crash saving images with python API.

Brecht Van Lommel noreply at git.blender.org
Thu Aug 30 12:48:34 CEST 2018


Commit: 22dc248f14be476cae67deb9731934dabb9c546f
Author: Brecht Van Lommel
Date:   Thu Aug 30 12:19:27 2018 +0200
Branches: master
https://developer.blender.org/rB22dc248f14be476cae67deb9731934dabb9c546f

Fix T56610: crash saving images with python API.

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

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 b6ba06a84d5..dc625ca8d9a 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -147,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, &lock);
+	BKE_image_release_ibuf(image, ibuf, lock);
 	WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, image);
 }
 
@@ -243,7 +243,7 @@ static int rna_Image_gl_load(Image *image, ReportList *reports, int frame, int f
 
 	if (ibuf == NULL || ibuf->rect == NULL) {
 		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);
 		return (int)GL_INVALID_OPERATION;
 	}
 
@@ -260,7 +260,7 @@ static int rna_Image_gl_load(Image *image, ReportList *reports, int frame, int f
 		image->bindcode[TEXTARGET_TEXTURE_2D] = 0;
 	}
 
-	BKE_image_release_ibuf(image, ibuf, NULL);
+	BKE_image_release_ibuf(image, ibuf, lock);
 
 	return error;
 }



More information about the Bf-blender-cvs mailing list