diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-07-11 15:56:13 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-07-11 15:56:13 +0300 |
commit | 42fa889e46c2f63cf99482b603fbe8d2117ed2c7 (patch) | |
tree | d5440b4cf2ea127e19acc047eb1832da1a4100de /source/blender/makesrna/intern/rna_image_api.c | |
parent | 117fd0247715bff6c265bb75f727112ce1fcb3cc (diff) | |
parent | 08274433e1bd9db5a2a27e5d2f8862e9cc3f27f0 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/makesrna/intern/rna_image_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_image_api.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c index 70b75efdb36..c7a3e103281 100644 --- a/source/blender/makesrna/intern/rna_image_api.c +++ b/source/blender/makesrna/intern/rna_image_api.c @@ -115,7 +115,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)); @@ -142,7 +144,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); } |